Closed sonvirgo closed 1 year ago
Base on wiki :
macOS
In macOS, we need to start tun2socks first so that it will create TUN interface for us.
tun2socks -device utun123 -proxy socks5://host:port -interface en0
Use ifconfig to bring the TUN interface up and assign addresses for it.
sudo ifconfig utun123 198.18.0.1 198.18.0.1 up
Add these specific routes so that tun2socks can handle primary connections.
sudo route add -net 1.0.0.0/8 198.18.0.1
sudo route add -net 2.0.0.0/7 198.18.0.1
sudo route add -net 4.0.0.0/6 198.18.0.1
sudo route add -net 8.0.0.0/5 198.18.0.1
sudo route add -net 16.0.0.0/4 198.18.0.1
sudo route add -net 32.0.0.0/3 198.18.0.1
sudo route add -net 64.0.0.0/2 198.18.0.1
sudo route add -net 128.0.0.0/1 198.18.0.1
sudo route add -net 198.18.0.0/15 198.18.0.1
Base on wiki : Add these specific routes so that tun2socks can handle primary connections.
sudo route add -net 1.0.0.0/8 198.18.0.1 sudo route add -net 2.0.0.0/7 198.18.0.1 sudo route add -net 4.0.0.0/6 198.18.0.1 sudo route add -net 8.0.0.0/5 198.18.0.1 sudo route add -net 16.0.0.0/4 198.18.0.1 sudo route add -net 32.0.0.0/3 198.18.0.1 sudo route add -net 64.0.0.0/2 198.18.0.1 sudo route add -net 128.0.0.0/1 198.18.0.1 sudo route add -net 198.18.0.0/15 198.18.0.1
I think they got same result in routing table sudo route add -net 0/1 198.18.0.1
I figure it out. My socks5 psiphon port do not support UDP, so there was no DNS By default tun2sock forward all UDP to the socks5, hence noway to resolve DNS by UDP. Workaround use TCP for DNS.
Verify steps
Version
2.4.1
What OS are you seeing the problem on?
macOS
Description
setup tun2socks to a remote socks5. add route to net 0/1 safari and terminal not connect, only Xcode and brew
CLI or Config
sudo ./tun2socks -device utun123 -proxy socks5://192.168.43.1:2088 -interface en0 sudo ifconfig utun123 198.18.0.1 198.18.0.1 up sudo route add -net 0/1 198.18.0.1
Logs
How to Reproduce
just run command sequence as the above