liuclare e101b1d7b0 Always route IPv6 into Xray TUN regardless of EnableIPv6Address (#9930)
* Always route IPv6 into Xray TUN regardless of EnableIPv6Address

EnableIPv6Address controls whether the TUN interface is assigned an IPv6
address, but it also gated whether ::/0 was added to autoSystemRoutingTable.
With the default (false), IPv6 had no route pointing at the TUN device and
followed the system default route instead, leaving the tunnel unproxied and
exposing the host's real IPv6 address.

The embedded template SampleTunInbound already declares both families; the
generated config discarded it. #9843 restored ::/0 only inside the
EnableIPv6Address == true branch, so the false branch still leaks.

Route both families unconditionally and let the option control only the
interface address. The same conditional existed a second time in the
RouteExcludeAddress branch and is fixed as well.

Fixes #9929

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Add regression tests for IPv6 routing in the Xray TUN inbound

Both assertions fail on 31044f44 and pass with the fix:

  Tun_ShouldRouteIPv6IntoTunnel(enableIPv6Address: False)
    Expected collection {"0.0.0.0/0"} to contain "::/0".

  TunRouteExcludeAddress_ShouldIncludeIPv6Ranges
    Expected collection {...44 IPv4 ranges...} to have an item matching x.Contains(:).

The theory also covers enableIPv6Address: true, which passes on both revisions,
so the tests only fail while the defect is present. The gateway count assertion
pins the intended split of responsibilities: EnableIPv6Address governs the
interface address, never the routing table.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: liuclare <177657698+liuclare@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 20:15:18 +08:00
2026-06-26 17:30:28 +08:00
2025-05-28 20:04:12 +08:00
2026-08-07 14:07:44 +08:00
2026-07-17 09:13:19 +08:00

v2rayN

A GUI client for Windows, Linux and macOS. Support Xray and sing-box and others

CodeFactor Release Downloads Telegram

Windows Linux macOS GPG Signed


Download / 下载

Download the latest release here:

在这里下载最新版本:

https://github.com/2dust/v2rayN/releases

Tip

v2rayN is the desktop version. For the mobile version, please visit the v2rayNG
v2rayN 是电脑版,手机版请访问 v2rayNG

https://github.com/2dust/v2rayNG


Documentation / 使用文档

Read the Wiki for usage guides and configuration details.

请阅读 Wiki 获取使用说明和配置教程。

https://github.com/2dust/v2rayN/wiki


Supported Platforms / 支持平台

Platform / 平台 x64 x86 arm64 riscv64 loong64
Windows - -
Linux -
macOS - - -

Minimum OS requirements: Release files introduction / 最低系统要求:发布文件介绍


GPG Verification / GPG 签名校验

Release files are signed with GPG to verify authenticity and integrity, helping prevent mirror, ISP, or CDN hijacking.

发布文件已使用 GPG 签名,可用于校验文件真实性与完整性,预防镜像站、运营商或 CDN 劫持。

Fingerprint / 公钥指纹

7694 5E9F 3E9A 168F 8070 F195 805D 661C
134D FAF6 8903 C199 463C 31E5 AE90 3AE0

Community / 社区

Telegram Group / Telegram 群组:

https://t.me/v2rayN

Telegram Channel / Telegram 频道:

https://t.me/github_2dust

Languages
C# 92%
Shell 8%