From b1cf2ec83721dd906038a261ea43e84aa889fdff Mon Sep 17 00:00:00 2001 From: Texot Date: Fri, 17 Apr 2020 11:29:59 +0800 Subject: [PATCH] Fix: dns tcp-tls X509.HostnameError (#638) --- dns/util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dns/util.go b/dns/util.go index ad52f051..b1541091 100644 --- a/dns/util.go +++ b/dns/util.go @@ -133,6 +133,7 @@ func transform(servers []NameServer, resolver *Resolver) []dnsClient { ClientSessionCache: globalSessionCache, // alpn identifier, see https://tools.ietf.org/html/draft-hoffman-dprive-dns-tls-alpn-00#page-6 NextProtos: []string{"dns"}, + ServerName: host, }, UDPSize: 4096, Timeout: 5 * time.Second,