-1

I am trying to connect to an external endpoint, but traffic to external endpoints has to be forwarded through an http proxy. How do I do this in the paho Java client? I can't find their Authenticator/know what to set to make this work. You can set custom headers but I don't know how to make that work with a proxy.

Andrew
  • 6,295
  • 11
  • 56
  • 95
  • Possible duplicate of [Is java client of PAHO proxy aware and enables sending of MQTT messages across enterprise proxy to brokers hosted in the internet?](https://stackoverflow.com/questions/44253083/is-java-client-of-paho-proxy-aware-and-enables-sending-of-mqtt-messages-across-e) – esqew Apr 11 '19 at 00:56
  • added details. that person was asking for pure mqtt, not mqtt over websockets – Andrew Apr 11 '19 at 05:02

1 Answers1

2

Looking at the code I'm not sure you can out of the box at the moment.

This issue includes a code to use a Custom SocketFactory to make a connection via a proxy. (This might work if you don't need to authenticate to use your proxy)

And there is an open feature request issue to add it to the core code.

hardillb
  • 54,545
  • 11
  • 67
  • 105