Windows TUN with auto_route can leave public IPv4 traffic on Ethernet
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- networking
Direzione di ricerca
Start by reading the Windows TUN auto_route handling and route selection code, then reproduce the report with the provided standalone configuration and Find-NetRoute query. Compare the selected interface with and without the two /1 route_address entries; done means public IPv4 traffic selects the TUN interface on the affected setup or the limitation and its cause are identified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Operating system
Windows
System version
Windows edition, version, and OS build from winver
Installation type
Third-party graphical clients that advertise themselves as using sing-box (Windows)
If you are using a graphical client, please provide the version of the client.
UAC Spoofer Desktop 1.1.3 (Windows x64)
Version
sing-box version 1.13.14
Environment: go1.26.4 windows/amd64
Revision: 25a600db24f7680ad9806ce5427bd0ab8afe1114
Description
On the affected Windows machine, TUN started with auto_route: true and strict_route: true. While the client showed TUN as connected, Find-NetRoute -RemoteIPAddress 142.251.155.4 selected Ethernet via 0.0.0.0/0, with RouteMetric: 0 and Protocol: NetMgmt. With the system proxy bypassed, the YouTube request was reset during the TLS handshake.
Expected behavior: Windows selects the TUN interface for public IPv4 traffic covered by auto_route.
Workaround: We set the TUN's IPv4 route_address entries to 0.0.0.0/1 and 128.0.0.0/1 and kept route.auto_detect_interface enabled. The affected user confirmed that YouTube loaded after this change.
Could sing-box offer split IPv4 default routes for Windows systems where the physical adapter's /0 wins? This resembles #4666 at the route-selection level. Whether it has the same underlying cause is unknown.
Reproduction
The issue was observed in the desktop client. The following standalone configuration passed sing-box check. Runtime reproduction with the standalone CLI is pending.
{
"log": { "level": "debug" },
"inbounds": [
{
"type": "tun",
"interface_name": "singbox-repro",
"address": ["172.20.0.1/30"],
"auto_route": true,
"strict_route": true,
"stack": "mixed"
}
],
"outbounds": [{ "type": "direct", "tag": "direct" }],
"route": { "auto_detect_interface": true, "final": "direct" }
}
1-On the affected machine, close the desktop client and run sing-box run -c config.json as Administrator.
2-While TUN is active, run Find-NetRoute -RemoteIPAddress 142.251.155.4 and record the selected interface and prefix.
3-Stop sing-box, add "route_address": ["0.0.0.0/1", "128.0.0.0/1"] to the TUN inbound, and repeat the route query.
4-Record whether the selected interface changes from Ethernet to singbox-repro.
Logs
InterfaceAlias : Ethernet
DestinationPrefix : 0.0.0.0/0
RouteMetric : 0
Protocol : NetMgmt
curl: (35) Recv failure: Connection was reset
Supporter
- I am a sponsor
Integrity requirements
- 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.
- Lingua principale
- Go
- Stelle
- 40.4k
- Fork
- 5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SagerNet/sing-box
-
`check` and startup are quadratic in outbound group size since 1.14.4 (duplicate tag check)Forse già presa @Tidehyc l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
database file removal errorsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
Tutte le issue di SagerNet/sing-box
Issue simili
-
good first issue tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Edwin-metcalf/MetCode#76 ·
I maintainer di solito rispondono entro 1 giorno
-
-diff's removed-name budget ignores the names the -ptr pass testedForse già presa @nova-loop l’ha presa oggi. Apertaarea: cli bug good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TMHSDigital/subenum#495 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort:s impact:med raised-by:worker risk:low to:worker
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
medici-finance/assay#8120 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
reportedBy/community
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openchoreo/openchoreo#5751 ·
I maintainer di solito rispondono entro 1 giorno