FlowerWrong / tun2socks

Redirect tun flow to socks 5 in golang, support tcp and udp.
420 stars 108 forks source link

怎么我用这个程序翻墙失败? #66

Closed luckypoem closed 4 years ago

luckypoem commented 4 years ago

hi。

yudeMacBook-Air:~ brite$ sudo ./tun2socks_darwin_amd64 Password: 2019/08/23 21:22:20 main.go:52: [app] config file path is /Users/brite/.tun2socks/config.ini 2019/08/23 21:22:20 proxies.go:62: [proxies] default proxy: "B" 2019/08/23 21:22:20 tun_darwin.go:29: [tun] interface name is utun5 2019/08/23 21:22:20 cmd.go:14: [command] ifconfig utun5 198.18.0.0 198.18.0.0 mtu 1500 netmask 255.254.0.0 up 2019/08/23 21:22:20 cmd.go:14: [command] route -n add -net 198.18.0.0 -netmask 255.254.0.0 -interface utun5 2019/08/23 21:22:20 cmd.go:14: [command] route -n add -net 91.108.4.0 -netmask 255.255.252.0 -interface utun5 2019/08/23 21:22:20 cmd.go:14: [command] route -n add -net 91.108.56.0 -netmask 255.255.252.0 -interface utun5 2019/08/23 21:22:20 cmd.go:14: [command] route -n add -net 109.239.140.0 -netmask 255.255.255.0 -interface utun5 2019/08/23 21:22:20 cmd.go:14: [command] route -n add -net 149.154.160.0 -netmask 255.255.240.0 -interface utun5 2019/08/23 21:22:20 cmd.go:14: [command] route -n add -net 149.154.167.0 -netmask 255.255.255.0 -interface utun5 2019/08/23 21:22:20 cmd.go:14: [command] route -n add -host 8.8.8.8 -interface utun5 2019/08/23 21:22:20 cmd.go:14: [command] route -n add -host 4.4.4.4 -interface utun5 2019/08/23 21:22:20 app.go:82: [app] run tun2socks(0.50) success 2019/08/23 21:22:21 cmd.go:38: [shell] output Current active networkservice is Wi-Fi, 81B2DAA9-7694-4EE6-A656-1A9E7FE293F3 old dns is 127.0.0.1, set dns to 127.0.0.1 2019/08/23 21:22:21 dns.go:12: [dns] listen on 0.0.0.0:53 2019/08/23 21:22:48 udp2socks5.go:121: [error] ReadSocksReply failed EOF 2019/08/23 21:22:48 udp.go:79: [error] NewUDPTunnel failed EOF 2019/08/23 21:22:53 udp2socks5.go:88: [error] Fail to connect SOCKS proxy read tcp 127.0.0.1:52026->127.0.0.1:1080: i/o timeout 2019/08/23 21:22:53 udp.go:79: [error] NewUDPTunnel failed read tcp 127.0.0.1:52026->127.0.0.1:1080: i/o timeout 2019/08/23 21:22:57 udp2socks5.go:88: [error] Fail to connect SOCKS proxy read tcp 127.0.0.1:52032->127.0.0.1:1080: i/o timeout 2019/08/23 21:22:57 udp.go:79: [error] NewUDPTunnel failed read tcp 127.0.0.1:52032->127.0.0.1:1080: i/o timeout 2019/08/23 21:22:58 udp2socks5.go:88: [error] Fail to connect SOCKS proxy read tcp 127.0.0.1:52034->127.0.0.1:1080: i/o timeout 2019/08/23 21:22:58 udp.go:79: [error] NewUDPTunnel failed read tcp 127.0.0.1:52034->127.0.0.1:1080: i/o timeout 2019/08/23 21:22:58 udp2socks5.go:121: [error] ReadSocksReply failed EOF 2019/08/23 21:22:58 udp.go:79: [error] NewUDPTunnel failed EOF 2019/08/23 21:22:59 udp2socks5.go:88: [error] Fail to connect SOCKS proxy read tcp 127.0.0.1:52039->127.0.0.1:1080: i/o timeout 2019/08/23 21:22:59 udp.go:79: [error] NewUDPTunnel failed read tcp 127.0.0.1:52039->127.0.0.1:1080: i/o timeout 2019/08/23 21:23:23 udp2socks5.go:88: [error] Fail to connect SOCKS proxy read tcp 127.0.0.1:52070->127.0.0.1:1080: i/o timeout 2019/08/23 21:23:23 udp.go:79: [error] NewUDPTunnel failed read tcp 127.0.0.1:52070->127.0.0.1:1080: i/o timeout 2019/08/23 21:24:08 udp2socks5.go:121: [error] ReadSocksReply failed EOF 2019/08/23 21:24:08 udp.go:79: [error] NewUDPTunnel failed EOF 2019/08/23 21:24:08 udp2socks5.go:121: [error] ReadSocksReply failed EOF 2019/08/23 21:24:08 udp.go:79: [error] NewUDPTunnel failed EOF 2019/08/23 21:24:31 udp2socks5.go:88: [error] Fail to connect SOCKS proxy read tcp 127.0.0.1:52142->127.0.0.1:1080: i/o timeout 2019/08/23 21:24:31 udp.go:79: [error] NewUDPTunnel failed read tcp 127.0.0.1:52142->127.0.0.1:1080: i/o timeout 2019/08/23 21:24:31 udp2socks5.go:121: [error] ReadSocksReply failed EOF 2019/08/23 21:24:31 udp.go:79: [error] NewUDPTunnel failed EOF 2019/08/23 21:24:34 udp2socks5.go:121: [error] ReadSocksReply failed EOF 2019/08/23 21:24:34 udp.go:79: [error] NewUDPTunnel failed EOF

访问显示ip的网站,显示的是我的isp分配给我的ip地址,不是我的ss服务器的ip.我在mac上开着纸飞机,我直接用纸飞机翻墙没有问题。

luckypoem commented 4 years ago

可以回复一下吗? 非常感谢!

FlowerWrong commented 4 years ago

似乎是你的ss不支持udp,而你开启了udp支持

luckypoem commented 4 years ago

果然。在启用了/Users/brite/.tun2socks/config.ini文件里的[udp]段的 enabled = false后, 运行sudo ./tun2socks_darwin_amd64不再遇错,可以成功翻墙了

luckypoem commented 4 years ago

hi. 不过为何打不开一些flg的网站,比如动态#网?如何解决这问题?

FlowerWrong commented 4 years ago

加到代理列表里面应该可以 https://github.com/FlowerWrong/tun2socks/blob/master/config.example.ini#L499