Using MQTT behind proxy using PAHO c / cpp

Viewed 604

So I have my paho client behind a ccproxy server with sock enabled.

The problem is in paho python lib there is a method exposed for setting proxy

client.proxy_set(proxy_type=socks.HTTP, proxy_addr="192.168.1.7", proxy_port=808)

Can someone guide me on the proxy setup for the same on cpp couldn't find much documentation in the docs or the community.

2 Answers

Paho Client for C++ does not seem to support proxies yet, see also this issue

Assuming you are running the code on Linux.

Have you tried running the compiled application with the socksify command?

This inserts a shim into the library that handles socket creation and wraps them in a connection to the Socks proxy (It looks like it may support HTTP Connect based proxying as well).

Related