mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-14 21:31:16 +08:00
Fix: ALPN should on DoH instead of DoT (#2232)
This commit is contained in:
parent
a794819869
commit
93400cf44d
@ -3,6 +3,7 @@ package dns
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
@ -102,6 +103,10 @@ func newDoHClient(url, iface string, r *Resolver) *dohClient {
|
||||
|
||||
return dialer.DialContext(ctx, "tcp", net.JoinHostPort(ip.String(), port), options...)
|
||||
},
|
||||
TLSClientConfig: &tls.Config{
|
||||
// alpn identifier, see https://tools.ietf.org/html/draft-hoffman-dprive-dns-tls-alpn-00#page-6
|
||||
NextProtos: []string{"dns"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -63,8 +63,6 @@ func transform(servers []NameServer, resolver *Resolver) []dnsClient {
|
||||
Client: &D.Client{
|
||||
Net: s.Net,
|
||||
TLSConfig: &tls.Config{
|
||||
// alpn identifier, see https://tools.ietf.org/html/draft-hoffman-dprive-dns-tls-alpn-00#page-6
|
||||
NextProtos: []string{"dns"},
|
||||
ServerName: host,
|
||||
},
|
||||
UDPSize: 4096,
|
||||
|
Loading…
Reference in New Issue
Block a user