Fix: resolver dial context udp

This commit is contained in:
yaling888
2021-11-11 00:53:42 +08:00
parent 038cc1f6b5
commit d0c23998d2
5 changed files with 79 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ func newDoHClient(url string, r *Resolver, proxyAdapter string) *dohClient {
if proxyAdapter == "" {
return dialer.DialContext(ctx, "tcp", net.JoinHostPort(ip.String(), port))
} else {
return dialContextWithProxyAdapter(ctx, proxyAdapter, ip, port)
return dialContextWithProxyAdapter(ctx, proxyAdapter, "tcp", ip, port)
}
},
},