You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the route refactoring of v1.11, SOCKS5 UDP can't be route correctly. Previously only scenario in #1370 is affected, but this gets worse since version 1.11.
I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
The text was updated successfully, but these errors were encountered:
Here I'm sending a DNS request over a SOCKS proxy:
» docker run --net=host -v $PWD/config.json:/config.json -it ghcr.io/sagernet/sing-box:v1.11.0-beta.9 -c /config.json run
INFO[0000] network: updated default interface wlp0s20f3, index 2
INFO[0000] inbound/mixed[mixed-in]: tcp server started at 127.0.0.1:10888
INFO[0000] sing-box started (0.00s)
INFO[0002] [3058626039 0ms] inbound/mixed[mixed-in]: inbound connection from 127.0.0.1:41076
INFO[0002] [3058626039 0ms] inbound/mixed[mixed-in]: inbound packet connection to :0
DEBUG[0002] [3058626039 0ms] router: sniffed packet protocol: dns
INFO[0002] [3058626039 1ms] outbound/direct[direct-out]: outbound packet connection
ERROR[0002] [3058626039 1ms] inbound/mixed[mixed-in]: process connection from 127.0.0.1:41076: invalid argument
» docker run --net=host -v $PWD/config.json:/config.json -it ghcr.io/sagernet/sing-box:v1.11.0-beta.8 -c /config.json run
INFO[0000] network: updated default interface wlp0s20f3, index 2
INFO[0000] inbound/mixed[mixed-in]: tcp server started at 127.0.0.1:10888
INFO[0000] sing-box started (0.00s)
INFO[0001] [1992170862 0ms] inbound/mixed[mixed-in]: inbound connection from 127.0.0.1:42362
INFO[0001] [1992170862 0ms] inbound/mixed[mixed-in]: inbound packet connection to :0
INFO[0001] [1992170862 0ms] outbound/direct[direct-out]: outbound packet connection
I see two differences between these two versions: in beta 9, I see an "invalid arguments" error, and the sniffer detected a DNS packet, even though I didn't enable it.
Operating system
Windows
System version
Windows 11 26100.2454
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
No response
Version
Description
Since the route refactoring of v1.11, SOCKS5 UDP can't be route correctly. Previously only scenario in #1370 is affected, but this gets worse since version 1.11.
https://github.com/SagerNet/sing/blob/809d8eca139712f6c833cea813674a1cb1154ba5/protocol/socks/handshake.go#L270
A line of
destination = request.Destination
is missing. However, this violated related RFCs, and a correct fix should always fill the destination with0.0.0.0:0
as described in #1370.sing-box/route/route.go
Lines 464 to 475 in 8a138e3
These lines are for handling
0.0.0.0:0
, but they should be moved to a location before:match
.sing-box/route/route.go
Line 368 in 8a138e3
Reproduction
Use software that support SOCKS5 UDP ASSOCIATE to test. e.g. configure NATTypeTester to use SOCKS5 proxy
127.0.0.1:1080
and do UDP STUN test.Logs
>sing-box.exe run -c config.json INFO[0000] network: updated default interface WLAN, index 15 INFO[0000] inbound/socks[0]: tcp server started at 127.0.0.1:1080 INFO[0000] sing-box started (0.11s) INFO[0021] [4133872565 0ms] inbound/socks[0]: inbound connection from 127.0.0.1:62351 INFO[0021] [4133872565 15ms] inbound/socks[0]: inbound packet connection to :0 INFO[0021] [4133872565 15ms] outbound/direct[0]: outbound packet connection INFO[0043] [564257197 0ms] inbound/socks[0]: inbound connection from 127.0.0.1:62470 INFO[0043] [564257197 14ms] inbound/socks[0]: inbound packet connection to :0 INFO[0043] [564257197 14ms] outbound/direct[0]: outbound packet connection
Supporter
Integrity requirements
The text was updated successfully, but these errors were encountered: