Mosquitto client in a proxy network

I am using OpenWrt 19.07.6 and my mqtt broker (mosquitto) is behind a proxy server. Can help how can I configure my mosquitto client to get subscribed to topics in the broker through the proxy server network ?

Which device runs OpenWrt, the client, the server, or the proxy?

Which devices are under your control, and which of them are not?

What kind of proxy is that? An HTTP proxy?

1 Like

Mqtt client device runs Openwrt and is the device under my control. Need to get this mqtt client work with the server, through the proxy (Corporate office proxy server and has no control). I can only have access in the mqtt client device which is running openwrt.

The MQTT client can use a SOCKS proxy, but your corporate proxy is probably a HTTPS proxy (you should confirm this with your admin), and those are not directly compatible.

If your proxy allows CONNECT on ports other that 443, you can try to use a SOCKS-over-HTTPS proxy. For example, there exists a REDSOCKS package that seems to meet your needs.

1 Like

Thank you. Will check this.