Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed May 4, 2024
1 parent 398dbbd commit 8d21f9b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion v2rayN/v2rayN/Handler/ShareHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,21 @@ private static string ShareWireguard(ProfileItem item)

private static string GetIpv6(string address)
{
return Utils.IsIpv6(address) ? $"[{address}]" : address;
if (Utils.IsIpv6(address))
{
if (address.StartsWith('[') && address.EndsWith(']'))
{
return address;
}
else
{
return $"[{address}]";
}
}
else
{
return address;
}
}

private static int GetStdTransport(ProfileItem item, string? securityDef, ref Dictionary<string, string> dicQuery)
Expand Down

0 comments on commit 8d21f9b

Please sign in to comment.