From 1f42d32e1a1b0f38775614d39f5cd9daee5a452f Mon Sep 17 00:00:00 2001 From: DHR60 Date: Fri, 10 Oct 2025 16:58:18 +0800 Subject: [PATCH] Fix Freedom Resolver (#8100) --- .../Services/CoreConfig/Singbox/SingboxDnsService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs index ba5560f0..ce4d2619 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxDnsService.cs @@ -43,6 +43,16 @@ public partial class CoreConfigSingboxService }); } + //Outbound Freedom Resolver + var freedomOutbound = singboxConfig.outbounds?.FirstOrDefault(t => t is { type: "direct", tag: Global.DirectTag }); + if (freedomOutbound != null) + { + freedomOutbound.domain_resolver = new() + { + server = Global.SingboxDirectDNSTag, + }; + } + await GenOutboundDnsRule(node, singboxConfig, Global.SingboxOutboundResolverTag); } catch (Exception ex)