patterniha and Claude Opus 5.5
2933b0c8d5
TUN inbound: Don't warn that loopback DNS servers are blocked
...
With autoSystemWfpBlockLeak, loopback now always stays allowed, so a DNS
server in dns like 127.0.0.1, a local resolver, stays reachable although
it lies in neither gateway nor autoSystemRoutingTable. Leave loopback
servers out of the warning that queries to them cannot go through the TUN
and are blocked, and say so in the README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-11-02 12:27:26 +03:30
patterniha and Claude Opus 5.5
bb4cd4b6d3
TUN inbound's autoSystemWfpBlockLeak: Add "allexceptlan"
...
"allexceptlan" is "all" but for the local network: traffic to and from
private (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7), link-local
(169.254.0.0/16, fe80::/10), multicast (224.0.0.0/4, ff00::/8) and broadcast
(255.255.255.255) addresses stays allowed, so that printers, the router's
settings page, or casting to a TV keep working while nothing else leaves
outside the TUN.
It includes "dns": a resolver on the local network, like the router's,
would forward the queries outside the TUN, so DNS stays blocked there. The
LAN permit sits below the other values, like the permit through the TUN, so
they still apply on the local network, e.g. "tcp/445" blocks Windows file
sharing with it. The DNS Client service keeps mDNS and LLMNR, to the local
network's addresses only. "all" overrides it.
The addresses are matched with FWP_V4_ADDR_MASK and FWP_V6_ADDR_MASK
conditions on the remote address, which match when any of them does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-11-02 11:50:18 +03:30
patterniha and Claude Opus 5.5
468f745fc2
TUN inbound's autoSystemWfpBlockLeak: Add "all", "tcp", "udp", "icmp" and port ranges; Always allow loopback, DHCP and IPv6 neighbor discovery
...
autoSystemWfpBlockLeak now also takes:
- "all": everything outside the TUN, IPv4 and IPv6, in both directions, so
nothing but Xray leaves except through the TUN.
- "tcp", "udp": all ports of that protocol, also written "tcp/0", "udp/0".
- "tcp/<low>-<high>", "udp/<low>-<high>": a range of ports, matched with
FWP_MATCH_RANGE, as two conditions on the same field would match when
either does.
- "icmp": ICMP and ICMPv6, e.g. ping. It takes no port: in ICMP filters the
local port holds the type, and "icmp/0" would read as the echo reply.
Values are normalized: "tcp/0" and "tcp/1-65535" become "tcp", and
"tcp/53-53" becomes "tcp/53".
Whatever is blocked, loopback, which cannot leave the system, and what
Windows itself needs on the local link now always stay allowed: DHCP, DHCPv6,
and IPv6 neighbor and multicast listener discovery. These used to be allowed
only along with "misconfigtun", so "udp" or "icmp" would otherwise have cut
DHCP or IPv6 neighbor discovery, and "tcp" any local proxy, Xray's own
inbounds included. Loopback being allowed means that with "dns", a local
resolver on 127.0.0.1:53 now works for other programs (its own queries to
port 53 or 853 outside the TUN stay blocked), and the DNS Client service
may use it.
"all" reuses the filters of "misconfigtun", which now also let everything
through the TUN, for both IP versions whatever the routes.
On other TUN options: keeping the system's DNS inside the TUN, with "all",
"dns", "windnsclient", or anything covering TCP or UDP port 53 ("udp",
"tcp/50-60", ...), needs dns, as Windows can no longer reach the DNS
servers of the other interfaces; the config is rejected otherwise. Like the
other values, the new ones need autoSystemRoutingTable. The filters do not
need autoOutboundsInterface, as Xray is allowed by its app ID; it still
keeps Xray's own connections out of the TUN's routes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-11-02 11:13:10 +03:30
6cdd323ad8
TUN inbound's autoSystemWfpBlockLeak: Support "tcp/port" and "udp/port"; "dns" covers "tcp/853" and "udp/853" as well ( #7288 )
...
https://github.com/XTLS/Xray-core/pull/6853#issuecomment-6492838227
https://github.com/XTLS/Xray-core/pull/7288#issuecomment-6507229727
https://github.com/XTLS/Xray-core/pull/7288#issuecomment-6516762634
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-31 13:16:31 +00:00
风扇滑翔翼 and GitHub
d1140de273
Chore: Regenerate *.pb.go files ( #7287 )
...
https://github.com/XTLS/Xray-core/pull/7263#issuecomment-6464669635
2026-10-31 07:13:55 +00:00
78b5a6ec5c
GitHub Action CI: Enforce stricter checks on generated protobuf files ( #7263 )
...
https://github.com/XTLS/Xray-core/pull/7263#issuecomment-6447862934
https://github.com/XTLS/Xray-core/pull/7263#issuecomment-6484719865
https://github.com/XTLS/Xray-core/pull/7263#issuecomment-6485805671
---------
Co-authored-by: Fangliding <Fangliding.fshxy@outlook.com >
2026-10-29 02:34:47 +00:00
6a4274ab75
TUN inbound: autoOutboundsInterface should not set IP_BOUND_IF on IPv6 sockets on Darwin (mainly macOS) ( #7230 )
...
Fixes https://github.com/XTLS/Xray-core/issues/7228
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-28 20:34:40 +00:00
3071fbfa25
Sockopt: Handle single-family interface binding on Windows, including TUN inbound's autoOutboundsInterface ( #7214 )
...
And https://github.com/XTLS/Xray-core/pull/7214#issuecomment-6329118637
https://github.com/XTLS/Xray-core/pull/7201#issuecomment-6314453444
Fixes https://github.com/XTLS/Xray-core/issues/7160#issuecomment-6246944012
---------
Co-authored-by: patterniha <71074308+patterniha@users.noreply.github.com >
2026-10-28 10:15:58 +00:00
Artem Lytkin and GitHub
557657b576
TUN inbound: Read large TCP segments straight into Xray-core's buffers on Linux ( #7179 )
...
https://github.com/XTLS/Xray-core/pull/7130#issuecomment-6119897360
https://github.com/XTLS/Xray-core/pull/7156#issuecomment-6205035216
https://github.com/XTLS/Xray-core/pull/7179#issuecomment-6250145934
2026-10-21 11:49:36 +00:00
fe2ae23f42
Sockopt: Cancel dialing after failed to bind interface, external controllers included such as TUN inbound's ( #7173 )
...
https://github.com/XTLS/Xray-core/pull/7161#issuecomment-6185101741
Fixes https://github.com/XTLS/Xray-core/issues/7160#issuecomment-6200788453
---------
Co-authored-by: Gleb <a1212gleb@gmail.com >
2026-10-16 06:37:52 +00:00
Artem Lytkin and GitHub
8703fdb101
WireGuard, MASQUE proxies: Use Xray-core's built-in lightweight TCP/IP stack instead of gVisor as well ( #7156 )
...
https://github.com/XTLS/Xray-core/pull/7130#issuecomment-6116258188
https://github.com/XTLS/Xray-core/pull/7130#issuecomment-6120742739
https://github.com/XTLS/Xray-core/pull/7130#issuecomment-6137264458
https://github.com/XTLS/Xray-core/pull/7156#issuecomment-6202933664
https://github.com/XTLS/Xray-core/pull/7156#issuecomment-6203239736
2026-10-15 23:38:14 +00:00
brookwko and RPRX
1dd2a0bd3c
TUN inbound: Support autoSystemDnsToGateway on FreeBSD as well ( #7123 )
...
https://github.com/XTLS/Xray-core/issues/6454#issuecomment-5859521287
https://github.com/XTLS/Xray-core/pull/6691#issuecomment-5445818753
https://github.com/XTLS/Xray-core/pull/6773 & https://github.com/XTLS/Xray-core/pull/6853
2026-10-12 02:48:59 +00:00
Artem Lytkin and RPRX
70ef97d564
TUN inbound: Use Xray-core's built-in lightweight TCP/IP stack instead of gVisor ( #7130 )
...
https://github.com/XTLS/Xray-core/pull/6771#issuecomment-5752154561
https://github.com/XTLS/Xray-core/pull/6795#issuecomment-6095740152
https://github.com/XTLS/Xray-core/pull/7130#issuecomment-6116258188
2026-10-12 02:18:56 +00:00
8989adfd3f
TUN inbound: Handle weak host send and forwarding on the outbound interface on Windows ( #7092 )
...
https://github.com/XTLS/Xray-core/issues/6776#issuecomment-5994046421
https://github.com/XTLS/Xray-core/issues/6776#issuecomment-5994796106
Closes https://github.com/XTLS/Xray-core/issues/6776
Closes https://github.com/XTLS/Xray-core/issues/6872
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-08 05:49:28 +00:00
Hossin Asaadi and GitHub
1a60fc78ff
TUN inbound: Duplicate the iOS tunnel file descriptor ( #6883 )
...
https://github.com/XTLS/Xray-core/pull/6883#issuecomment-6008368575
2026-10-08 05:14:14 +00:00
nSQUICK and GitHub
1e08d48d88
TUN inbound: Start on Windows when IPv6 is disabled system-wide ( #6874 )
...
https://github.com/XTLS/Xray-core/pull/6874#issuecomment-5989986544
2026-10-05 07:26:00 +00:00
Denis and GitHub
08775afd65
WireGuard inbound: Reduce memory held by idle UDP flows ( #6856 )
...
https://github.com/XTLS/Xray-core/pull/6856#issuecomment-5870639238
2026-10-05 01:56:36 +00:00
1f304916bd
TUN inbound: Add autoSystemWfpBlockLeak on Windows (blocks "dns" and "misconfigtun" IPv4/IPv6 traffic leaks outside the TUN); Rename autoSystemDNS to autoSystemDnsToGateway on Linux (and change some behaviors) ( #6853 )
...
https://github.com/XTLS/Xray-core/pull/6853#issuecomment-5899791359
https://github.com/XTLS/Xray-core/pull/6853#issuecomment-5901287980
https://github.com/XTLS/Xray-core/pull/6853#issuecomment-5903680113
https://github.com/XTLS/Xray-core/pull/6853#issuecomment-5904123488
https://github.com/XTLS/Xray-core/pull/6853#issuecomment-5904647772
https://github.com/XTLS/Xray-core/pull/6853#issuecomment-5905047424
Fixes https://github.com/XTLS/Xray-core/issues/6454#issuecomment-5863800676
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com >
2026-09-30 06:26:16 +00:00
7b8ade3ec5
TUN inbound: Only close the UDP connection that actually finished ( #6814 )
...
https://github.com/XTLS/Xray-core/pull/6814#pullrequestreview-5324536423
---------
Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com >
2026-09-27 21:06:19 +00:00
Artem Lytkin and GitHub
5dda894e29
TUN inbound: Reuse existing Wintun adapter by name on Windows again ( #6811 )
...
Fixes https://github.com/XTLS/Xray-core/issues/6780
2026-09-27 20:39:17 +00:00
youugiuhiuh and GitHub
47a2c2ffdc
TUN inbound: Add autoSystemDNS on Linux (to TUN's gateway) ( #6773 )
...
https://github.com/XTLS/Xray-core/issues/6454#issuecomment-4931311976
https://github.com/XTLS/Xray-core/pull/6773#issuecomment-5755516423
https://github.com/XTLS/Xray-core/pull/6807#issuecomment-5807844210
2026-09-27 20:07:53 +00:00
LjhAUMEM and RPRX
efc9e6da62
WireGuard outbound: Remove remoteDNS' "local" mode and domainStrategy ( #6771 )
...
https://github.com/XTLS/Xray-core/issues/6567#issuecomment-5660953757
https://github.com/XTLS/Xray-core/pull/6771#issuecomment-5751826982
https://github.com/XTLS/Xray-core/pull/6771#issuecomment-5751831637
2026-09-20 19:07:51 +00:00
c412e77a9b
TUN inbound: Preserve UDP packet destinations with traffic stats ( #6747 )
...
https://github.com/XTLS/Xray-core/pull/6747#issuecomment-5647964551
---------
Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com >
2026-09-12 20:09:35 +00:00
LjhAUMEM and GitHub
c7245c0336
TUN inbound: Refine Windows support ( #6478 )
...
https://github.com/XTLS/Xray-core/pull/6478#issuecomment-5489052152
2026-09-08 02:51:35 +00:00
brookwko and GitHub
c1958dba04
TUN inbound: Support autoSystemRoutingTable and autoOutboundsInterface on FreeBSD as well ( #6691 )
...
https://github.com/XTLS/Xray-core/pull/6691#issuecomment-5445818753
Closes https://github.com/XTLS/Xray-core/issues/5594#issuecomment-4789101025
2026-08-27 22:32:45 +00:00
Jidos and GitHub
aa3d6589da
TUN inbound: Wait() blocks via kqueue instead of busy-spinning on Darwin ( #6580 )
...
Fixes https://github.com/XTLS/Xray-core/issues/6579
2026-08-26 21:29:58 +00:00
Jasper344612 and GitHub
1d8eb81d70
TUN inbound: Add desc config for Windows ("Wintun" by default) ( #6486 )
...
https://github.com/XTLS/Xray-docs-next/pull/872#issuecomment-4936055488
2026-07-17 22:21:33 +00:00
0bafca9486
Stats: Fix GetOrRegister*() races ( #6468 )
...
Fixes https://github.com/XTLS/Xray-core/pull/6467#issue-4856851059
---------
Co-authored-by: Joshua Su <i@joshua.su >
2026-07-10 20:34:27 +00:00
yiguodev and GitHub
0495b17650
TUN inbound: Refine gateway and autoSystemRoutingTable on macOS ( #6434 )
...
https://github.com/XTLS/Xray-core/pull/6434#issuecomment-4885521586
2026-07-07 00:28:50 +00:00
yiguodev and GitHub
65f6f0a43b
TUN inbound: Refine gateway and autoSystemRoutingTable on Linux ( #6398 )
...
https://github.com/XTLS/Xray-core/pull/6398#issuecomment-4880261591
2026-07-04 02:25:15 +00:00
Jasper344612 and GitHub
3263ae9255
TUN inbound: Fix autoOutboundsInterface on Linux ( #6413 )
...
Fixes https://github.com/XTLS/Xray-core/issues/6412
2026-07-04 01:38:25 +00:00
yiguodev and GitHub
dda2b10c9d
TUN inbound: Add traffic counters; Metrics: Rely on instance ( #6349 )
...
https://github.com/XTLS/Xray-core/pull/6349#issuecomment-4775121300
2026-06-24 12:00:22 +00:00
Jasper344612 and GitHub
241aa38ac0
TUN inbound: Support autoSystemRoutingTable and autoOutboundsInterface on macOS and Linux as well ( #6366 )
...
https://github.com/XTLS/Xray-core/pull/6366#issuecomment-4788510365
2026-06-24 11:06:00 +00:00
e7e9254630
TUN inbound: Avoid panic on nil RemoteAddr due to quickly closed connection ( #6365 )
...
Fixes https://github.com/XTLS/Xray-core/issues/6364#issuecomment-4778262075
---------
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com >
2026-06-23 11:37:21 +00:00
Жора Змейкин and RPRX
9cd9382e3d
TUN inbound: Support env XRAY_TUN_FD on Linux as well ( #6338 )
...
https://github.com/XTLS/Xray-core/pull/6338#issuecomment-4770945163
2026-06-22 17:38:36 +00:00
LjhAUMEM and GitHub
da21a8f77f
TUN & WireGuard inbounds: Ignore b.UDP's domain when receiving it from outbound ( #6285 )
...
Fixes https://github.com/XTLS/Xray-core/issues/6279
2026-06-09 20:53:55 +00:00
风扇滑翔翼 and GitHub
3239d21168
TUN inbound: autoOutboundsInterface bypasses loopback addresses ( #6276 )
...
Fixes https://github.com/XTLS/Xray-core/issues/6269
2026-06-09 09:40:55 +00:00
风扇滑翔翼 and GitHub
06b4931743
TUN inbound: Start TUN by AlwaysOnInboundHandler ( #6275 )
...
Fixes https://github.com/XTLS/Xray-core/issues/6274
2026-06-09 09:22:33 +00:00
𐲓𐳛𐳪𐳂𐳐 𐲀𐳢𐳦𐳫𐳢 𐲥𐳔𐳛𐳪𐳌𐳑𐳖𐳇 and GitHub
d43a808ea5
GitHub Action CI: Add Go source file format check ( #6090 )
...
https://github.com/XTLS/Xray-core/pull/6057#issuecomment-4364819830
And https://github.com/XTLS/Xray-core/pull/6149#issuecomment-4546876261
2026-05-29 15:04:59 +00:00
LjhAUMEM and GitHub
52cf9ef5d6
TUN inbound: Better "autoOutboundsInterface": "auto" ( #6035 )
...
https://github.com/XTLS/Xray-core/pull/6035#issuecomment-4336755860
Fixes https://github.com/XTLS/Xray-core/issues/6030
2026-05-02 12:18:25 +00:00
yiguodev and GitHub
2fff03720d
TUN inbound: Reply fake pong to ICMP ping ( #6015 )
...
https://github.com/XTLS/Xray-core/pull/6015#issuecomment-4321525342
2026-05-01 22:51:42 +00:00
风扇滑翔翼 and GitHub
3691741440
Chore: Use buf.New() instead of buf.NewWithSize() ( #5946 )
...
https://github.com/XTLS/Xray-core/pull/5941#issuecomment-4252905907
https://github.com/XTLS/Xray-core/pull/5946#issuecomment-4253919073
2026-04-15 16:57:51 +00:00
6780045550
TUN inbound: Add FreeBSD support ( #5891 )
...
And reverts "refactor `mtu` to support setting IPv4/v6 separately" https://github.com/XTLS/Xray-core/pull/5891#issuecomment-4245677624
And fixes `autoOutboundsInterface` on Windows https://github.com/XTLS/Xray-core/pull/5887#issuecomment-4251719900
---------
Co-authored-by: LjhAUMEM <llnu14702@gmail.com >
2026-04-15 12:40:19 +00:00
LjhAUMEM and GitHub
5c3d639c09
Chore: Use buf.NewWithSize() ( #5941 )
2026-04-15 12:11:51 +00:00
LjhAUMEM and GitHub
806b8dc27d
TUN inbound: Add gateway, dns, autoSystemRoutingTable, autoOutboundsInterface for Windows ( #5887 )
...
And refactor `mtu` to support setting IPv4/v6 separately
Example: https://github.com/XTLS/Xray-core/pull/5887#issue-4198837696
2026-04-13 13:38:10 +00:00
Rynnya and Fangliding
6a1a13b797
TUN inbound: Closable by AlwaysOnInboundHandler ( #5860 )
...
https://github.com/XTLS/Xray-core/pull/5860#issuecomment-4193477738
2026-04-07 16:32:06 +08:00
LjhAUMEM and GitHub
4c3020ca6f
TUN inbound: Fix UDP FullCone NAT ( #5888 )
...
Fixes https://github.com/XTLS/Xray-core/issues/5845
2026-04-05 12:59:22 +00:00
风扇滑翔翼 and GitHub
85f1234863
TUN inbound: Generate deterministic GUID on Windows ( #5811 )
...
Closes https://github.com/XTLS/Xray-core/issues/5810
2026-03-19 10:18:07 +00:00
RPRX and GitHub
d14767d4f3
Chore: Generate *.pb.go files with protoc v6.33.5
...
Download https://github.com/protocolbuffers/protobuf/releases/tag/v33.5
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.11
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.0
(Xray-core/) go run ./infra/vprotogen
2026-02-03 09:34:02 +00:00
Evozi Team and GitHub
c3af657c0e
TUN inbound: Add iOS support ( #5612 )
...
And https://github.com/XTLS/Xray-core/pull/5612#issuecomment-3799070838
2026-01-26 12:43:10 +00:00