From 628b7d9ebb8b1db042e6a6601132cdf8a90070c7 Mon Sep 17 00:00:00 2001 From: hiddify <114227601+hiddify-com@users.noreply.github.com> Date: Sun, 29 Sep 2024 00:03:37 +0200 Subject: [PATCH] if an outbound has detour, use dns over proxy --- config/outbound.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/outbound.go b/config/outbound.go index b79ee43..73e0886 100644 --- a/config/outbound.go +++ b/config/outbound.go @@ -147,9 +147,11 @@ func patchOutbound(base option.Outbound, configOpt HiddifyOptions, staticIpsDns return nil, "", formatErr(err) } var serverDomain string - if server, ok := obj["server"].(string); ok { - if server != "" && net.ParseIP(server) == nil { - serverDomain = fmt.Sprintf("full:%s", server) + if detour, ok := obj["detour"].(string); !ok || detour == "" { + if server, ok := obj["server"].(string); ok { + if server != "" && net.ParseIP(server) == nil { + serverDomain = fmt.Sprintf("full:%s", server) + } } }