-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Potential UDP Packet Handling Issue in TUN Mode (sing-box 1.11.4) #2655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here is a summary of the configuration file:
|
It's seems to be fine here with |
Through the logs, I noticed that sing-box thinks it's connecting via a proxy. But according to tcpdump/pwru, it's actually doing direct L3 forwarding. Check the pwru results—by the way, even if it matches "direct," it would still involve NAT instead of sending with the original IP. |
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 5 days |
Operating system
Linux
System version
Ubuntu 24.04.1 LTS x86_64
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
When running sing-box 1.11.4 with TUN mode enabled for UDP traffic, if a specific outbound route is configured for UDP port 443, there is a high likelihood (approximately 90% or more) that the software will incorrectly forward UDP packets directly out of the WAN interface without proper processing. This behavior may expose raw packet data and bypass intended routing rules.
And after I downgraded sing-box to version 1.10.7, the issue disappeared.
Reproduction
Steps to Reproduce:
Configure sing-box 1.11.4 to use TUN mode for UDP inbound traffic.
Set up a specific outbound rule within the software for UDP port 443.
Initiate UDP traffic on port 443.
Observe that in a majority of cases (around 90% or higher), the UDP packets are forwarded directly via the WAN interface without modification or proper routing.
you may use this python code to send quic traffic
Logs
Supporter
Integrity requirements
The text was updated successfully, but these errors were encountered: