This commit is contained in:
DHR60 2026-03-04 19:47:31 +08:00
parent 54c525fbf2
commit d069ea27f8
2 changed files with 3 additions and 3 deletions

View file

@ -101,7 +101,7 @@ public partial class CoreConfigSingboxService
{
continue;
}
if (testRule.domain_keyword?.Count > 0 && !kvp.Key.StartsWith("keyword:"))
if (testRule.domain_keyword?.Count > 0 && !kvp.Key.Contains(':'))
{
testRule.domain = testRule.domain_keyword;
testRule.domain_keyword = null;
@ -213,7 +213,7 @@ public partial class CoreConfigSingboxService
// The matching format (domain:, full:, etc.) is the same as the domain
// in the commonly used Routing System. The difference is that without a prefix,
// it defaults to using the full: prefix (similar to the common hosts file syntax).
if (rule.domain_keyword?.Count > 0 && !kvp.Key.StartsWith("keyword:"))
if (rule.domain_keyword?.Count > 0 && !kvp.Key.Contains(':'))
{
rule.domain = rule.domain_keyword;
rule.domain_keyword = null;

View file

@ -96,7 +96,7 @@ public partial class CoreConfigSingboxService
{
continue;
}
if (domainRule.domain_keyword?.Count > 0 && !host.StartsWith("keyword:"))
if (domainRule.domain_keyword?.Count > 0 && !host.Contains(':'))
{
domainRule.domain = domainRule.domain_keyword;
domainRule.domain_keyword = null;