TUN inbound: Start on Windows when IPv6 is disabled system-wide (#6874)

https://github.com/XTLS/Xray-core/pull/6874#issuecomment-5989986544
This commit is contained in:
nSQUICK
2026-10-05 07:26:00 +00:00
committed by GitHub
parent 5121c28b85
commit 1e08d48d88
+5
View File
@@ -178,6 +178,11 @@ startOver:
}
ipif, err := t.luid.IPInterface(family)
if err != nil {
// With IPv6 disabled system-wide (DisabledComponents), the adapter has no
// IPv6 interface at all. Skip the family unless the config asks for it.
if err == windows.ERROR_NOT_FOUND && family == windows.AF_INET6 && !address6 && !route6 {
continue
}
return err
}
ipif.RouterDiscoveryBehavior = winipcfg.RouterDiscoveryDisabled