eclipse-paho / paho.mqtt.python

paho.mqtt.python
Other
2.22k stars 725 forks source link

Connect using proxy url like "wss://app.company.com/mqtt" #591

Open ameenfarook opened 3 years ago

ameenfarook commented 3 years ago

How can we connect (only) using the proxy url like "wss://app.company.com/mqtt". We created a proxy url that points to mqtt broker for websocket listener from ingress on kubernetes. From paho-javascript library we are able to connect using a single fully qualified WebSocket URI like this "wss://app.company.com/mqtt" on the constructor. I am asking for the similar behaviour.

ameenfarook commented 3 years ago

Anybody have any comment on this issue ?

ameenfarook commented 3 years ago

"ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it"

This is the error i am seeing when i try to connect using proxy url.

MattBrittan commented 11 months ago

The library does not currently support URL's; it accepts a host & port (passed to connect) and a path (defaults to /mqtt but can be set with ws_set_options). There are no current plans to add URL support (Roger flagged this issue as an enhancement request so it's possible someone will look at adding URL support in the future).