From beffa919d3f148e217acbeab6a8ecf814b9ba884 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sun, 26 Jul 2026 20:46:32 +0800 Subject: [PATCH] Use /126 prefixes for TUN IPv6 addresses https://github.com/2dust/v2rayN/pull/9830 --- v2rayN/ServiceLib/Global.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index 92c50a37..2c3e44d0 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -757,15 +757,17 @@ public class Global "10.0.0.1/30", ]; + // Prefixes must leave room for a peer address (max /126); the sing-box system + // stack derives a gateway from the first prefix and rejects single-address prefixes. public static readonly IReadOnlyList TunIpv6Address = [ - "fc00::172:18:0:1/128", - "fc00::172:31:0:1/128", - "fc00::172:20:0:1/128", - "fc00::172:16:0:1/128", - "fc00::192:168:100:1/128", - "fc00::10:10:14:1/128", - "fc00::10:1:0:1/128", - "fc00::10:0:0:1/128", + "fc00::172:18:0:1/126", + "fc00::172:31:0:1/126", + "fc00::172:20:0:1/126", + "fc00::172:16:0:1/126", + "fc00::192:168:100:1/126", + "fc00::10:10:14:1/126", + "fc00::10:1:0:1/126", + "fc00::10:0:0:1/126", ]; }