[zeromq-dev] How to connect to remote zeromq socket through localhost socks proxy?

Full Name finn_schmidt at myway.com
Wed Oct 30 10:06:59 CET 2013


I'm trying to connect to a remote zeromq program over a socks proxy (localhost port 4355). On this page (http://grokbase.com/t/zeromq/zeromq-dev/134f3hndjn/connecting-through-a-socks-proxy) a person wanting to do the same, suggests to use ZMQ_ROUTER_RAW. I cannot find any reference of ZMQ_ROUTER RAW in the zeromq 3. source, and since Pieter Hintjens on the same page suggests to backport it to 3.x  I suppose ZMQ_ROUTER_RAW is only included in version 4. So I had a look at the source of version 4.x, and in this file (https://github.com/zeromq/zeromq4-x/blob/master/doc/zmq_setsockopt.txt) it says that “This option [ZMQ_ROUTER_RAW] is deprecated, please use ZMQ_STREAM sockets instead”. 

So I searched for more information about ZMQ_STREAM. As far as I understand, zmq_stream is meant to connect to non-zmq sockets which I suppose would make it ideal to use for a socks proxy. In the examples I found however, I can only find information on connecting to a regular socket. What I cannot find any information about, is how to connect to a remote zmq port __through__ a socks proxy. 

Would anybody be able to explain me (with some example code if possible) how I could connect to a remote zmq socket going _through_ a local socks proxy (localhost port 4355)?



More information about the zeromq-dev mailing list