mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-15 00:45:01 +03:00
Remove redundant string operation (#8324)
This commit is contained in:
@@ -425,7 +425,7 @@ public class Utils
|
||||
var domain = authority;
|
||||
|
||||
// Handle IPv6 addresses, e.g., "[2001:db8::1]:443"
|
||||
if (authority.StartsWith("[") && authority.Contains("]"))
|
||||
if (authority.StartsWith('[') && authority.Contains(']'))
|
||||
{
|
||||
var closingBracketIndex = authority.LastIndexOf(']');
|
||||
if (closingBracketIndex < authority.Length - 1 && authority[closingBracketIndex + 1] == ':')
|
||||
|
||||
Reference in New Issue
Block a user