Fixed issue of adding a second set of "[]" to an IPv6 address already enclosed in "[]".

This commit is contained in:
志成zhi_cheng 2024-05-01 23:56:47 +08:00
parent e9b392d1c0
commit aa8618fc55

View file

@ -264,7 +264,7 @@ namespace v2rayN.Handler
private static string GetIpv6(string address) 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<string, string> dicQuery) private static int GetStdTransport(ProfileItem item, string? securityDef, ref Dictionary<string, string> dicQuery)