From d069ea27f8aadbefc48d67a6add5f6823e9a0a94 Mon Sep 17 00:00:00 2001 From: DHR60 Date: Wed, 4 Mar 2026 19:47:31 +0800 Subject: [PATCH] Fix --- .../Services/CoreConfig/Singbox/SingboxDnsService.cs | 4 ++-- .../Services/CoreConfig/Singbox/SingboxRoutingService.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs index 5d41c24f..afab27d9 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs @@ -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; diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxRoutingService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxRoutingService.cs index 281a44e2..45620c41 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxRoutingService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxRoutingService.cs @@ -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;