From aa8618fc555bc6cfebac8a0b4a0ab1238b57fe48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E6=88=90zhi=5Fcheng?= Date: Wed, 1 May 2024 23:56:47 +0800 Subject: [PATCH] Fixed issue of adding a second set of "[]" to an IPv6 address already enclosed in "[]". --- v2rayN/v2rayN/Handler/ShareHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Handler/ShareHandler.cs b/v2rayN/v2rayN/Handler/ShareHandler.cs index a647b5bb..8c387028 100644 --- a/v2rayN/v2rayN/Handler/ShareHandler.cs +++ b/v2rayN/v2rayN/Handler/ShareHandler.cs @@ -264,7 +264,7 @@ namespace v2rayN.Handler private static string GetIpv6(string address) { - return Utils.IsIpv6(address) ? $"[{address}]" : address; + return Utils.IsIpv6(address) ? address.Contains("[") ? address : $"[{address}]" : address; } private static int GetStdTransport(ProfileItem item, string? securityDef, ref Dictionary dicQuery)