Skip to content

Update tun.md v26.11.9 - #903

Merged
RPRX merged 25 commits into
XTLS:mainfrom
patterniha:strictRoute
Nov 9, 2026
Merged

RPRX merged 25 commits into
XTLS:mainfrom
patterniha:strictRoute

Conversation

@patterniha

Copy link
Copy Markdown
Contributor

patterniha and others added 4 commits September 29, 2026 13:55
Document the Windows-only `strictRoute` option of the TUN inbound (true
by default), added in XTLS/Xray-core#6853: with autoSystemRoutingTable
set, WFP filters keep DNS (when `dns` is set), and IPv6 when the TUN
cannot carry it, of every program but Xray from leaving outside the TUN.
Setting it to false turns them off. In English, Chinese and Russian.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follows XTLS/Xray-core#6853, where strictRoute now defaults to false like
sing-box's strict_route: the filters are only added when it is enabled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follows XTLS/Xray-core#6853: on Windows 11, Windows Server 2022 and
later, the Windows DNS Client service may only connect through the TUN
interface, so DNS over HTTPS or TLS set up for another interface cannot
leave through it either; name resolution on the local network (LLMNR,
mDNS) stays allowed. Also say why port 53 is blocked for all programs:
Windows sends each interface's queries through that interface whatever
the routes say, and other programs reach a DNS server on the local
network through its more specific LAN route.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follows XTLS/Xray-core#6853, where the option is now named after what it
sets up in the system, like autoSystemRoutingTable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@patterniha patterniha changed the title Add strictRoute Add autoSystemWFP Sep 29, 2026
@patterniha patterniha changed the title Add autoSystemWFP Add autoSystemWfpBlockLeak Sep 29, 2026
patterniha and others added 3 commits September 30, 2026 03:07
Follows XTLS/Xray-core#6853: an IP version, IPv4 or IPv6, is blocked when
no route of it is in autoSystemRoutingTable, whatever gateway holds, as
Windows gives the TUN link-local addresses of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follows XTLS/Xray-core#6853: Xray assigns no address on Linux, Windows
gives the TUN interface link-local addresses itself, and macOS and
FreeBSD use 169.254.10.1/30.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d `autoSystemDnsToGateway`

Follows XTLS/Xray-core#6853: autoSystemWfpBlockLeak takes
["dns", "misconfig"]. The dns field now explains what Windows does with
the servers and what the other systems do instead, autoSystemDnsToGateway
(Linux) gets its own section, and the old macOS-only note under gateway
is folded into the note for all systems.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
patterniha and others added 3 commits September 30, 2026 07:59
…sToGateway` cannot apply

Follows XTLS/Xray-core#6853.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d "windnsclient"; "dns" covers DoT and DoQ

Docs for the XTLS/Xray-core PR from `windows-tun-wfp-ports`, in zh, en and
ru: "dns" now stands for "udp/53", "tcp/53", "windnsclient", "tcp/853" and
"udp/853", any "tcp/<port>" or "udp/<port>" can be given, and keeping the
system's DNS inside the TUN needs `dns`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
patterniha and others added 2 commits November 2, 2026 11:12
…p" and port ranges

Docs for the XTLS/Xray-core PR from `windows-tun-wfp-all`, in zh, en and ru:
"all", "tcp" and "udp" (also "tcp/0"), ranges like "udp/10-20", and "icmp";
loopback, DHCP, DHCPv6 and IPv6 neighbor discovery always stay allowed; and
what needs `dns`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Docs for "allexceptlan" from the XTLS/Xray-core `windows-tun-wfp-all`
branch, in zh, en and ru: "all" but for the local network's private,
link-local, multicast and broadcast addresses, with "dns" included.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
patterniha and others added 7 commits November 2, 2026 12:27
…mWfpBlockLeak`

Docs for the XTLS/Xray-core `windows-tun-wfp-all` branch, in zh, en and ru:
besides lying within `gateway` or `autoSystemRoutingTable`, the servers in
`dns` may be loopback addresses like 127.0.0.1, for a local resolver.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Docs for the XTLS/Xray-core `windows-tun-wfp-all` branch, in zh, en and ru:
"tcp/0" no longer stands for all ports; ports, and both ends of a range,
have to lie within 1-65535, the low end not above the high end.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…" and the like

Docs for the XTLS/Xray-core `windows-tun-wfp-all` branch, in zh, en and ru:
"tcpv4", "tcpv6", "udpv4", "udpv6", "icmpv4" and "icmpv6" limit a value to
one IP version, with ports written the same way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…sInterface` on Windows

Documents the changes for XTLS/Xray-core#6776 and XTLS/Xray-core#6872.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…or `autoOutboundsInterface`

In zh, en and ru: a connection that cannot be bound to the outbound
interface fails instead of leaving unbound (XTLS/Xray-core#7173), and on
Windows, an interface with only IPv4 or only IPv6 works, with connections of
the missing IP version failing (XTLS/Xray-core#7214).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…takes "ipv4:" and "ipv6:", and should have at least "dns"

Docs for the XTLS/Xray-core `windows-tun-wfp-all` branch, in zh, en and ru:

- autoSystemWfpBlockLeak recommends at least ["dns"] first, lists its
  values more briefly, "dns" first, and takes "ipv4:" or "ipv6:" in front
  of any value instead of "tcpv4" and the like.
- autoSystemRoutingTable and autoSystemDnsToGateway (through
  resolvconf(8)) work on FreeBSD as well, where autoOutboundsInterface
  switches to FIB 1; connections to loopback addresses stay unbound.
- name has to be utunN on macOS and tunN on FreeBSD, and Windows reuses an
  existing Wintun adapter; on Windows with IPv6 disabled, IPv6 entries
  keep the TUN interface from starting.
- The usage tips say how to keep the system's DNS from leaking on each
  system, and that ping replies come from Xray itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
In zh, en and ru: add "dns" to block DNS over IPv6 as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lue instead of "ipv4:" and "ipv6:", and ports alone for TCP and UDP

"dns" stands for "53", "853" and "windnsclient" now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
patterniha and others added 2 commits November 4, 2026 21:14
…ows with IPv6 disabled system-wide, as in `gateway` and `autoSystemRoutingTable`

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… turns IPv6 off on all interfaces

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…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]>
@RPRX RPRX changed the title Add autoSystemWfpBlockLeak Update tun.md v26.11.9 Nov 9, 2026
@RPRX
RPRX merged commit d617091 into XTLS:main Nov 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants