diff --git a/extras/outbounds/dns_https.go b/extras/outbounds/dns_https.go index d7f0781..c6817c1 100644 --- a/extras/outbounds/dns_https.go +++ b/extras/outbounds/dns_https.go @@ -20,7 +20,7 @@ type dohResolver struct { func NewDoHResolver(addr string, timeout time.Duration, sni string, insecure bool, next PluggableOutbound) PluggableOutbound { // User may provide just the IP address or full URL - if !strings.HasSuffix(addr, "https://") { + if !strings.HasPrefix(addr, "https://") { addr = fmt.Sprintf("https://%s/dns-query", addr) } tr := http.DefaultTransport.(*http.Transport).Clone()