From 6dc0f3f792dc6cf6395fc03d45baa7349c455550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E6=97=A5=E6=A2=A6=E4=B8=BB=E4=B9=89?= Date: Sat, 16 May 2026 07:37:19 +0800 Subject: [PATCH] fix: prefix match in DNS https (#1573) Signed-off-by: Cherrling --- extras/outbounds/dns_https.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()