Skip to content

MQTT must be dynamic port #1

@Pushkinmazila2

Description

@Pushkinmazila2

Title: MQTT transport uses hardcoded port 1883 instead of configurable endpoint

Description:

Currently MQTT transport initializes connections with a hardcoded port:

MqttOptions::new(client_id, server_uri, 1883);

Additionally, port 1883 appears across multiple modules:

  • transport/mqtt.rs
  • flow_j_mqtt.rs
  • peer_registry.rs
  • tests

This prevents:

  • using MQTT over TLS (port 8883)
  • running over WebSockets (common in restrictive networks)
  • proper stealth configuration (e.g., port 443)

Expected behavior:

  • Parse port from server_uri or config
  • Support TLS (8883) and custom ports
  • Allow fallback to HTTPS-like ports for evasion

Suggestion:
Introduce a unified broker parser:

host:port → (host, port)

and pass port dynamically into MqttOptions.

Impact:
This is critical for real-world deployment and contradicts the "stealth" goals described in README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions