heiher / hev-socks5-tunnel

A high-performance tun2socks for Linux/Android/FreeBSD/macOS/iOS/WSL2 (IPv4/IPv6/TCP/UDP)
MIT License
636 stars 130 forks source link

Problem socks5 session handshake in linux OS #124

Closed Vicio59 closed 1 day ago

Vicio59 commented 3 weeks ago

Hi, I'm looking for a socks5 client for Linux that supports UDP and Full Cone NAT with which I will have to route all my traffic. With Windows I have used both Netch and Proxifyre and I was really happy with them. The Socks5 server was created with Dante. I found this project for Linux but I can't make it work with Ubuntu or even with Arch Linux because no type of traffic is routed correctly. This is the log that always repeats: [2024-04-21 16:14:12] [E] 0x5d9a5bb8a960 socks5 session handshake [2024-04-21 16:14:12] [E] 0x5d9a5bb0d8c0 socks5 client read auth [2024-04-21 16:14:12] [E] 0x5d9a5bb0d8c0 socks5 session handshake [2024-04-21 16:14:12] [E] 0x5d9a5be8b020 socks5 client read auth

This is my configuration: tunnel: name: tun0 mtu: 8500 multi-queue: false ipv4: 198.18.0.1

socks5: port: 10589 address: 192.168.0.4 udp: 'udp' username: 'OKVICIUD6' password: 'mypasswd'

misc: log-file: stderr log-level: warn

These are the rules I added: sudo ip rule add fwmark 0x438 lookup main pref 10 sudo ip route add default dev tun0 table 20 sudo ip rule add lookup 20 pref 20

I also tried with: net.ipv4.ip_forward=1 sudo ufw disable change dns in /etc/resolv.conf

I have the impression that it is a problem with the routing rules, thanks for your precious help!

cattyhouse commented 3 weeks ago

You are having a dead loop, you need to bypass 192.168.0.4, so that it will not go through hev-socks5-tunnel's tun interface.

Vicio59 commented 3 weeks ago

You are having a dead loop, you need to bypass 192.168.0.4, so that it will not go through hev-socks5-tunnel's tun interface.

Hi, thanks for your help, I replaced the previous rules with these two: ip route add default dev tun0 scope link metric 20 ip route add 192.168.0.4 dev eth0 scope link metric 10 But unfortunately it still doesn't work, what else can I do?

Vicio59 commented 3 weeks ago

Sorry, I closed inadvertently, unfortunately I still can't use this script.

cattyhouse commented 3 weeks ago

https://github.com/heiher/hev-socks5-tunnel#linux