From 074ce5de04e9769d803bb9788fdfeffb28592c57 Mon Sep 17 00:00:00 2001 From: XXcipherX <56079532+XXcipherX@users.noreply.github.com> Date: Tue, 28 Jul 2026 05:11:20 +0300 Subject: [PATCH] Fix missing IPv6 default route for Xray TUN (#9843) * Fix IPv6 route for Xray TUN * Update V2rayInboundService.cs --------- Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com> --- .../Services/CoreConfig/V2ray/V2rayInboundService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs index 68e29531..d0bab527 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayInboundService.cs @@ -66,13 +66,14 @@ public partial class CoreConfigV2rayService var address = _config.TunModeItem.IPv4Address.NullIfEmpty() ?? Global.TunIPv4Address.First(); tunInbound.settings.gateway = [address]; + tunInbound.settings.autoSystemRoutingTable = ["0.0.0.0/0"]; if (_config.TunModeItem.EnableIPv6Address == true) { var address6 = _config.TunModeItem.IPv6Address.NullIfEmpty() ?? Global.TunIPv6Address.First(); tunInbound.settings.gateway.Add(address6); + tunInbound.settings.autoSystemRoutingTable.Add("::/0"); } - - tunInbound.settings.autoSystemRoutingTable = ["0.0.0.0/0"]; + var bindInterface = _config.CoreBasicItem.BindInterface?.TrimEx(); if (!bindInterface.IsNullOrEmpty()) {