knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.84k stars 1.47k forks source link

MQTT Connection through proxy possible? #616

Open t0m82 opened 5 years ago

t0m82 commented 5 years ago

I'm using the PubSubClient to connect to our IoT Platform via MQTT and everything is working fine. I'm working with an ESP8266 NodeMCU as hardware, ESP WiFi Lib to connect to the internet. Now I try to implement that client in our corporate network and there I'm facing to deal with a proxy ( 123.123.123.123:9400 ).

Is it possible to connect through a proxy with the pubsubclient? Or no chance?

knolleary commented 5 years ago

There is nothing in PubSubClient that deals with proxies. It leaves all responsibility for creating the network connection to whatever Client object you give it. I am not aware of a suitable Client that can work with proxies - but it isn't something I've ever had to research, so it may be possible.

t0m82 commented 5 years ago

Ah ok. so it is the job during the network/Wifi connection to deal with the proxy. The ESP Wifi Lib offers just the possibility to work with gateways (IP only), not with a proxy and certainly not with a proxy IP and port... any hint where to start with research..? Any idea?