xjasonlyu / tun2socks

tun2socks - powered by gVisor TCP/IP stack
https://github.com/xjasonlyu/tun2socks/wiki
GNU General Public License v3.0
2.86k stars 407 forks source link

cannot make curl request for tun0 #54

Closed ghost closed 3 years ago

ghost commented 3 years ago

hi, i tried from Debian 10 and Ubuntu 20.04 step to reproduce: ./tun2socks -device tun://tun0 -proxy socks5://127.0.0.1:9050 curl --interface tun0 https://api.myip.com curl: (7) Couldn't connect to server question: how to check if tun0 working? i started tor as proxy to check but not working ip a: 14: tun0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 500 link/none i cannot make to work tun0 driver i tried in rasberry (armv7) and AMD64 (Debian 10) In windows tun2socks works!.

image

xjasonlyu commented 3 years ago

First, you need to configure route tables. Then, make sure there is no traffic loop on your local network.

ghost commented 3 years ago

First, you need to configure route tables. Then, make sure there is no traffic loop on your local network.

can you give some example?

xjasonlyu commented 3 years ago

See Wiki

ghost commented 3 years ago

See Wiki

in wiki nothing about route table!

xjasonlyu commented 3 years ago

https://github.com/xjasonlyu/tun2socks/wiki/Route-configuration

ghost commented 3 years ago

thanks. but i cannot set to work my local ip for eth0 is 192.168.1.74 i tried this: route add -net 192.168.1.74 netmask 255.255.255.0 tun0

ip route add 192.168.1.0/24 dev tun0 but, i'm newbie in linux, and don't know how to configure your great software (in windows works without loot of settings), thanks for help, best regards.