Supports IPv6 addresses in profile summary

pull/7656/head
DHR60 2025-05-05 16:23:05 +08:00
parent 6911883995
commit 9af1e7bca5
1 changed files with 1 additions and 1 deletions

View File

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