any support for udp
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.
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.