tcpsocks icon indicating copy to clipboard operation
tcpsocks copied to clipboard

any support for udp

Open madhanraj opened this issue 10 years ago • 1 comments

I am trying to redirect the udp packet to particular port where I run my proxy (SOCKS) . I am supposed to obtain the original destination ipaddress of the client to add to the data field of socks message as per the RFC .

However , when I use REDIRECT chain as it sets the dest addr to the LO address i get the LO address 127.0.0.1 and the port where socks proxy client runs .

I tried patching SO_ORIGINAL_DST to obtain for UDP protocol also . In this case it would work if I use single FD for single dest . However when I use single FD for multiple connection it might not work .

I cannot add as part of rsvmsg , as I have to send to the proxy server in advance .

TPROXY works in prerouting , I am not sure how we use in the client side to send the first packet with the dest address . (I am not sure about the TPROXYing though)

Can you please suggest the method to overcome the problem . Thanks in advance.

madhanraj avatar Aug 12 '15 16:08 madhanraj

I also tried to make "UDP proxy" like tcprelay, but for UDP using TPROXY in the past, but failed.

I can try again later. I'll report here if anything useful comples out.

vi avatar Aug 14 '15 04:08 vi