From fa1e201c76e61ccb70d3d67b8888abd7885a0591 Mon Sep 17 00:00:00 2001 From: DHR60 <192860629+DHR60@users.noreply.github.com> Date: Sat, 26 Sep 2026 02:39:29 +0000 Subject: [PATCH] Fix sing-box dns (#10234) --- .../Services/CoreConfig/Singbox/SingboxDnsService.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs index e05e6bba..74f27cd0 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs @@ -365,9 +365,16 @@ public partial class CoreConfigSingboxService rule4ExpectedIPs = JsonUtils.DeepCopy(rule); rule4ExpectedIPs.geosite = regionGeosite; } + if (rule.geosite?.Count > 0 + || rule.domain?.Count > 0 + || rule.domain_keyword?.Count > 0 + || rule.domain_regex?.Count > 0 + || rule.domain_suffix?.Count > 0) + { + AddRules(rule, item, directDnsList); + } } - - if (rule.geosite?.Count > 0 || rule.domain?.Count > 0) + else { AddRules(rule, item, directDnsList); }