eclipse-paho / paho.mqtt.golang

Other
2.77k stars 534 forks source link

How to set a SOCKS5 proxy in code? #694

Closed m7rick closed 3 weeks ago

m7rick commented 3 weeks ago

I want to set the proxy directly in the code, but I haven't found the relevant method. Could you provide an example?

MattBrittan commented 3 weeks ago

There is an http proxy example (have not personally used or tested this but it would be a good place to start). The library provides the ability to provide your own dialer (e.g. SetDialer) so it should be pretty easy to work with SOCKS5. Sorry - I'm not going to write a custom example (and doubt anyone else will). Note: This area is intended for issues/bugs - please see the readme for the appropriate places to ask questions (but note that, to get a decent response, you will probably need to show your attempt at accompliching this and provide more detail - e.g. is the connection type MQTT/MQTTS/WS or WSS etc).

m7rick commented 3 weeks ago

Thanks