Supports IPv6 addresses in profile summary (#7656)

This commit is contained in:
DHR60
2025-07-29 19:16:50 +08:00
committed by GitHub
parent 6911883995
commit 82f9698c0d

View File

@@ -32,7 +32,7 @@ public class ProfileItem : ReactiveObject
public string GetSummary()
{
var summary = $"[{(ConfigType).ToString()}] ";
var arrAddr = Address.Split('.');
var arrAddr = Address.Contains(':') ? Address.Split(':') : Address.Split('.');
var addr = arrAddr.Length switch
{
> 2 => $"{arrAddr.First()}***{arrAddr.Last()}",