Commit Graph
5 Commits
Author SHA1 Message Date
patternihaandClaude Opus 5.5 14f4bcaf29 TUN inbound: Warn about forwarding on a new outbound interface too; Log failed restores of weak host send
As asked in review: switching between two interfaces with forwarding on now
warns about the new one, and an IPInterface failure while restoring weak
host send is logged, with the interface's name, instead of ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:20:31 +03:30
patternihaandClaude Opus 5.5 30a78f1563 TUN inbound: Merge the outbound guard's check and recheck
Since the TUN starts with forwarding on the outbound interface too, check
is only called through recheck, so they are one function now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:52:50 +03:30
patternihaandClaude Opus 5.5 46d49adc5c TUN inbound: Warn about forwarding on the outbound interface instead of refusing to start
Mobile Hotspot may well be on before the TUN starts, and having it share
the TUN instead of the physical interface then moves forwarding off it, but
the TUN can only be picked to share while it runs. So the TUN starts, with a
warning that says so, and Xray's own connections recover once forwarding
goes off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 16:12:47 +03:30
patternihaandClaude Opus 5.5 b71975abed TUN inbound: Log the outbound interface's forwarding once; Tweak messages
Windows turns forwarding on and off a few times while Mobile Hotspot starts,
so the error is logged when forwarding comes up, not on every change, and
turning weak host send off is logged once per IP version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:28:24 +03:30
patternihaandClaude Opus 5.5 6b0f06fb2b TUN inbound: Handle weak host send and forwarding on the outbound interface on Windows
Windows ignores the binding of autoOutboundsInterface (IP_UNICAST_IF) when
the outbound interface has weak host send or forwarding on for an IP version
routed to the TUN: Xray's own connections then go into the TUN, from that
interface's address, and stall.

While the TUN runs, weak host send is turned off on that interface for those
IP versions, and turned on again when it stops or another interface takes
over. Forwarding, which Mobile Hotspot and Internet Connection Sharing need,
cannot be turned off without breaking them, so it is reported instead: the
TUN does not start while it is on, and an error is logged when it comes on
later.

Fixes https://github.com/XTLS/Xray-core/issues/6776
Reports the cause of https://github.com/XTLS/Xray-core/issues/6872

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:14:52 +03:30