xjasonlyu / tun2socks

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

[Bug] Windows version hangs after a while #305

Closed x11r6 closed 6 months ago

x11r6 commented 8 months ago

Verify steps

Version

2.5.1

What OS are you seeing the problem on?

No response

Description

Hello, after configuring tun2socks on windows everything works fine for a while, until tun2socks end up using every single available outgoing port on the system (check the image) image. I guess after it reaches the port 65535 the software doesn't work anymore and it outputs the message "time="2023-10-11T00:04:57+02:00" level=warning msg="[TCP] dial 38.84.70.82:443: connect to 31.204.3.13:5432: dial tcp 31.204.3.13:5432: bind: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full."

CLI or Config

tun2socks-windows-amd64.exe -device wintun -proxy socks5://xxx:yyyy@zzzzzz:ttttt

Logs

time="2023-10-11T15:59:51+02:00" level=info msg="[TCP] 192.168.123.1:65422 <-> 157.240.231.35:443"
time="2023-10-11T15:59:51+02:00" level=info msg="[TCP] 192.168.123.1:65420 <-> 24.199.75.166:30945"
time="2023-10-11T15:59:51+02:00" level=info msg="[TCP] 192.168.123.1:65424 <-> 104.211.35.148:443"
time="2023-10-11T15:59:52+02:00" level=warning msg="[UDP] dial 157.240.231.35:443: client handshake: UDP ASSOCIATE: command not supported"
time="2023-10-11T15:59:55+02:00" level=warning msg="[UDP] dial 157.240.231.1:443: client handshake: UDP ASSOCIATE: command not supported"
time="2023-10-11T15:59:57+02:00" level=warning msg="[UDP] dial 157.240.231.35:443: client handshake: UDP ASSOCIATE: command not supported"
time="2023-10-11T16:00:02+02:00" level=info msg="[TCP] 192.168.123.1:65430 <-> 172.64.152.111:443"
time="2023-10-11T16:00:02+02:00" level=info msg="[TCP] 192.168.123.1:65429 <-> 24.199.78.244:30944"
time="2023-10-11T16:00:03+02:00" level=info msg="[TCP] 192.168.123.1:65433 <-> 143.198.246.222:443"
time="2023-10-11T16:00:04+02:00" level=warning msg="[UDP] dial 157.240.231.1:443: client handshake: UDP ASSOCIATE: command not supported"
time="2023-10-11T16:00:07+02:00" level=warning msg="[UDP] dial 157.240.231.35:443: client handshake: UDP ASSOCIATE: command not supported"
time="2023-10-11T16:00:10+02:00" level=info msg="[TCP] 192.168.123.1:65437 <-> 104.211.35.148:443"
time="2023-10-11T16:00:13+02:00" level=info msg="[TCP] 192.168.123.1:65441 <-> 23.96.124.156:443"
time="2023-10-11T16:00:13+02:00" level=info msg="[TCP] 192.168.123.1:65439 <-> 24.199.75.166:30945"
time="2023-10-11T16:00:16+02:00" level=warning msg="[TCP] dial 23.227.143.219:80: CONNECT: connection refused"
time="2023-10-11T16:00:19+02:00" level=info msg="[TCP] 192.168.123.1:65445 <-> 24.199.75.16:30944"
time="2023-10-11T16:00:20+02:00" level=info msg="[TCP] 192.168.123.1:65449 <-> 185.135.81.106:51021"
time="2023-10-11T16:00:23+02:00" level=warning msg="[TCP] dial 173.231.16.77:443: CONNECT: host unreachable"
time="2023-10-11T16:00:28+02:00" level=info msg="[TCP] 192.168.123.1:65451 <-> 104.211.35.148:443"
time="2023-10-11T16:00:34+02:00" level=info msg="[TCP] 192.168.123.1:65453 <-> 24.199.75.166:30945"
time="2023-10-11T16:00:36+02:00" level=info msg="[TCP] 192.168.123.1:65457 <-> 172.65.247.91:443"
time="2023-10-11T16:00:36+02:00" level=info msg="[TCP] 192.168.123.1:65455 <-> 24.199.78.244:30944"
time="2023-10-11T16:00:37+02:00" level=info msg="[TCP] 192.168.123.1:65459 <-> 51.15.137.75:7072"
time="2023-10-11T16:00:37+02:00" level=info msg="[TCP] 192.168.123.1:65461 <-> 104.26.9.6:443"

How to Reproduce

Keep tun2socks going for a while on windows (many programs used at once) and you'll notice

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days