Closed hdid closed 4 months ago
Hello, Would you mind describing your use case/how you intend to use it ? I never saw anybody using UDP association, as it is kind of cumbersome to use.
I think socks5 with udp should not supported, please keep it simple.
@erebe The main problem solved by wstunnel is the problem of WireGuard UDP QoS. I hope to maintain this original intention.
Adding udp support in the socks5 server will not change anything for wireguard.
wiregaurd will still use udp://
server, it is just that for now the socks5 server socks5://
only support tcp connection.
Anyway for now, I will work on supporting transparent proxy, I will see later for adding udp on socks5
UDP associate
is a standard sock5 feature, i think it is very useful if one needs to proxy udp traffic, things like udp dns, quic traffic, games, some audio call protocol, etc, via socks5 proxy. almost all socks5 proxy i have used support this feature.
+1 for adding this feature. Use case is SNMP communication with devices that only support SNMP via UDP.
Hi, Just to let you know that I will work in the incoming weeks to support socks5 udp association.
+1 good idea
By any chances, do you know a soft/way (running on linux) that allows to easily test udp association with socks5 ?
Would you mind trying this pre release https://github.com/erebe/wstunnel/releases/tag/v8.6.0 and let me know if it works for you ?
You should be able to start the tunnel as usual with -L socks5://xxx
Hi. I tested the latest version (v8.6.0) using this script and this script. UDP DNS packets are sent and received successfully.
I tested with the same scripts under Windows and am getting an error as soon as I run the script a second time. It works the first time. Can you check that case on your end as well, please?
wstunnel 8.6.0 ./wstunnel.exe client -L socks5://127.0.0.1:9999 ws://localhost:8888
2024-01-08T17:17:23.807036Z INFO wstunnel::socks5: Starting SOCKS5 server listening cnx on 127.0.0.1:9999
2024-01-08T17:17:23.809100Z INFO wstunnel::socks5_udp: Starting SOCKS5 UDP server listening cnx on 127.0.0.1:9999 with cnx timeout of 30s
2024-01-08T17:17:42.771773Z INFO wstunnel::socks5_udp: New UDP connection for 1.1.1.1:53
2024-01-08T17:17:42.772069Z INFO wstunnel::tcp: Opening TCP connection to localhost:8888
2024-01-08T17:17:53.796595Z ERROR wstunnel::socks5_udp: Cannot read from UDP server. Closing server: An existing connection was forcibly closed by the remote host. (os error 10054)
I started the server using: ./wstunnel.exe server ws://127.0.0.1:8888
I just tried the same under Linux (WSL) and on the 2nd run of check.py it just hangs on the s.recvfrom(4096)
call. No errors in the logs of the wstunnel
client or server.
Thanks for the feedback, it should be fixed by latest commit. I have updated the release with the fix https://github.com/erebe/wstunnel/releases/tag/v8.6.0 Let me know if it is ok
I released it in v9.0.0 https://github.com/erebe/wstunnel/releases/tag/v9.0.0
Feel free to re-open if it is nok
can you add UDP associate support for socks5 to handle udp packets (dns or ntp requests and so on)? thanx