if an outbound has detour, use dns over proxy

This commit is contained in:
hiddify
2024-09-29 00:03:37 +02:00
parent eb6843bd33
commit 628b7d9ebb

View File

@@ -147,9 +147,11 @@ func patchOutbound(base option.Outbound, configOpt HiddifyOptions, staticIpsDns
return nil, "", formatErr(err) return nil, "", formatErr(err)
} }
var serverDomain string var serverDomain string
if server, ok := obj["server"].(string); ok { if detour, ok := obj["detour"].(string); !ok || detour == "" {
if server != "" && net.ParseIP(server) == nil { if server, ok := obj["server"].(string); ok {
serverDomain = fmt.Sprintf("full:%s", server) if server != "" && net.ParseIP(server) == nil {
serverDomain = fmt.Sprintf("full:%s", server)
}
} }
} }