mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
Chore: open ForceAttemptHTTP2 on DoH
This commit is contained in:
parent
3e7970612a
commit
fb0289bb4c
|
@ -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
|
||||
}
|
||||
|
@ -75,7 +75,8 @@ func newDoHClient(url string, r *Resolver) *dohClient {
|
|||
return &dohClient{
|
||||
url: url,
|
||||
transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{ClientSessionCache: globalSessionCache},
|
||||
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 New Issue
Block a user