Chore: open ForceAttemptHTTP2 on DoH
This commit is contained in:
parent
3e7970612a
commit
fb0289bb4c
1 changed files with 3 additions and 2 deletions
|
@ -44,7 +44,7 @@ func (dc *dohClient) newRequest(m *D.Msg) (*http.Request, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
req, err := http.NewRequest(http.MethodPost, dc.url+"?bla=foo:443", bytes.NewReader(buf))
|
||||
req, err := http.NewRequest(http.MethodPost, dc.url, bytes.NewReader(buf))
|
||||
if err != nil {
|
||||
return req, err
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ func newDoHClient(url string, r *Resolver) *dohClient {
|
|||
url: url,
|
||||
transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{ClientSessionCache: globalSessionCache},
|
||||
ForceAttemptHTTP2: true,
|
||||
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
host, port, err := net.SplitHostPort(addr)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue