Repository navigation
TUN inbound: Log IPv6 setup errors (gateway, dns and autoSystemRoutingTable) instead of exiting on Windows when DisabledComponents turns IPv6 off, with autoSystemWfpBlockLeak's "misconfigtun" blocking IPv6 then - #7341
Merged
Conversation
…ns (#7337) #7337 (comment) Fixes #7336 --------- Co-authored-by: 风扇滑翔翼 <[email protected]> Co-authored-by: RPRX <[email protected]>
… turns IPv6 off on all interfaces #7332 (comment) With IPv6 off on all interfaces by DisabledComponents (0x01 and 0x10 both set, as in 0xFF), the IPv6 entries of gateway, dns and autoSystemRoutingTable are ignored and the TUN starts with IPv4 only, so one config works either way. The value takes effect at the next boot only, so ignored IPv6 routes add "[::/0]:misconfigtun" to autoSystemWfpBlockLeak: until the reboot, IPv6 the TUN would have taken cannot leave outside it, also through interfaces connected later. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…temWfpBlockLeak` #7332 (comment) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
…onents` turns IPv6 off, with "misconfigtun" blocking IPv6 then #7341 (comment) IPv6 entries are no longer left out. With IPv6 turned off by DisabledComponents (0x10, the non-tunnel interfaces, the TUN among them, as in 0xFF), IPv6 is set up as usual, and errors doing so, clearing its DNS servers included, are only logged; otherwise they exit, also for a config without IPv6 entries, which replaces the skips of #6874, #7325 and #7332. "misconfigtun" then blocks IPv6 outside the TUN whatever the routes, as IPv6 still works until the reboot that applies the value. Co-Authored-By: Claude Opus 5.5 <[email protected]>
patterniha
added a commit
to patterniha/Xray-docs-next
that referenced
this pull request
Nov 7, 2026
…onents` turns IPv6 off, with "misconfigtun" blocking IPv6 then XTLS/Xray-core#7341 (comment) IPv6 entries are no longer left out. With IPv6 turned off by DisabledComponents (0x10, the non-tunnel interfaces, the TUN among them, as in 0xFF), IPv6 is set up as usual, and errors doing so, clearing its DNS servers included, are only logged; otherwise they exit, also for a config without IPv6 entries, which replaces the skips of #6874, #7325 and #7332. "misconfigtun" then blocks IPv6 outside the TUN whatever the routes, as IPv6 still works until the reboot that applies the value. Co-Authored-By: Claude Opus 5.5 <[email protected]>
DisabledComponents turns IPv6 off on all interfacesDisabledComponents turns IPv6 off, with "misconfigtun" blocking IPv6 then
Collaborator
Author
…terface error on Windows Like the other IPv6 steps, so that an ignored missing IPv6 interface no longer logs as a bare "Element not found." Co-Authored-By: Claude Opus 5.5 <[email protected]>
DisabledComponents turns IPv6 off, with "misconfigtun" blocking IPv6 thenDisabledComponents turns IPv6 off, with "misconfigtun" blocking IPv6 then
DisabledComponents turns IPv6 off, with "misconfigtun" blocking IPv6 thengateway, dns and autoSystemRoutingTable) instead of exiting on Windows when DisabledComponents turns IPv6 off, with autoSystemWfpBlockLeak's "misconfigtun" blocking IPv6 then
RPRX
pushed a commit
that referenced
this pull request
Nov 8, 2026
…outingTable`) instead of exiting on Windows when `DisabledComponents` turns IPv6 off, with `autoSystemWfpBlockLeak`'s "misconfigtun" blocking IPv6 then (#7341) #7325 (comment) #7332 (comment) #7341 (comment) Replaces #7332, #7325 and #6874 --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #7332 (#7332 (comment)), reworked as in #7341 (comment).
With IPv6 turned off by
DisabledComponents(0x10, the non-tunnel interfaces, the TUN among them; 0xFF includes it), IPv6 forgateway,dnsandautoSystemRoutingTableis set up as usual, and errors doing so, clearing its DNS servers included, are only logged. Otherwise they exit, also for a config without IPv6 entries, which replaces the skips of #6874, #7325 and #7332."misconfigtun"then blocks IPv6 outside the TUN whatever the routes, because Windows appliesDisabledComponentsonly after a reboot, and until then IPv6 still works. For this,"misconfigtun"acts as ifautoSystemRoutingTablehad no IPv6 routes, which gives the same filters as"[::/0]:all". A literal"[::/0]:all"isn't used, as Xray counts"all"as blocking DNS, which needsdnsto be set, so a config withoutdnswould no longer start.The README now recommends at least
"dns"and"misconfigtun"forautoSystemWfpBlockLeak(#7332 (comment)).Tested on Windows 11 with Wintun 0.14.1, with the registry value and the IPv6 failures simulated in a test build. Before the reboot, routed IPv6 went through the TUN, and with
"misconfigtun"other programs' IPv6 (TCP, UDP, ping) couldn't leave through Wi-Fi or through an IPv6 adapter added after the TUN started, while IPv4, IPv6 loopback and Xray's own IPv6 still worked. After the reboot (no IPv6 interface, or its DNS servers refused), the TUN starts at once with the errors logged. Without the registry value, the same failures exit. On a real system, withDisabledComponentsset to 0x01 alone and a reboot, the TUN still gets its IPv6 address, route and DNS servers, so 0x10 is the bit that turns the TUN's IPv6 off.go test ./proxy/tun/passes, run as administrator.Docs: XTLS/Xray-docs-next#903
🤖 Generated with Claude Code