I want to make a transparent/global VPN. And I know redirection of packets is helpful. In this post:Configuring Ubuntu for Global SOCKS5 proxy , Khaled suggests to use iptables to redirect packets. But what I wonder is how the proxy knows the destination -- destination IP and remote server port . Since if the proxy listens on tcp layer, the destination info is lost. Is there someone knows how to get the destination info ? Many thanks
Asked
Active
Viewed 233 times
1 Answers
0
I saw an function getdestaddr
in redir.c of project shadowsocks-libev
, it uses getsockopt (sock_fd, SOL_IP, SO_ORIGINAL_DST, sockaddr_ptr, socklen_ptr). It solves destination for TCP. But it doesn't work for udp, so what about udp ?

Alan
- 1
- 1