-
Notifications
You must be signed in to change notification settings - Fork 107
Home
Welcome to the tun2socks wiki!
This mode worked with rules. Tun2socks created a dns server on 0.0.0.0:53. It will reply depend on rules. If a domain is proxied, the dns server will reply a faked ip, eg hijack www.google.com -> 198.18.26.133
. And then all flow with faked ip will be redirected to socks5. And others will be routed to default gateway.
This mode worked with route
table, so rules are useless, it will use the default proxy for tcp, and udp proxy is the configed one. For example ip2socks/darwin_setup_utun.sh. If you set your system dns server to 8.8.8.8, and route it via proxy. Then all dns query will be redirected to socks5 udp tunnel.
NOTE: darwin does not support batch route. You can use the modify one, compiled version.
- root you android device
-
GOOS=linux GOARCH=arm GOARM=7 go build -o tun2socks cmd/main.go
, editGOARM
for free. -
adb push tun2socks /data/local/tmp/
andadb push config.ini /data/local/tmp/
- start tun2socks
adb shell "su -c 'sleep 1'"
adb start-server
adb shell
cd /data/local/tmp/
./tun2socks -config=config.ini
- change your dns server to
127.0.0.1
- ok
You must install tap-windows-9.21.2.exe first. And then start it with administrator
command like tun2socks_windows_64.exe --config=config.ini
.
NOTE: you must start cmd.exe with administrator
.