Simplify sing-box rules for domain_suffix (#8306)

adapt to new domain_suffix behavior since sing-box 1.9.0
This commit is contained in:
MkQtS 2025-11-12 19:08:57 +08:00 committed by GitHub
parent f677934257
commit 30e9e64fd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -316,10 +316,8 @@ public partial class CoreConfigSingboxService
} }
else if (domain.StartsWith("domain:")) else if (domain.StartsWith("domain:"))
{ {
rule.domain ??= [];
rule.domain_suffix ??= []; rule.domain_suffix ??= [];
rule.domain?.Add(domain.Substring(7)); rule.domain_suffix?.Add(domain.Substring(7));
rule.domain_suffix?.Add("." + domain.Substring(7));
} }
else if (domain.StartsWith("full:")) else if (domain.StartsWith("full:"))
{ {