Browse Source

Merge pull request #72 from darhwa/doh-h2

Enable ForceAttemptHTTP2 on DoH client
pull/2667/head
Kslr 4 years ago committed by GitHub
parent
commit
45bf57826d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/dns/dohdns.go

2
app/dns/dohdns.go

@ -58,6 +58,7 @@ func NewDoHNameServer(url *url.URL, dispatcher routing.Dispatcher, clientIP net.
MaxIdleConns: 30,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 30 * time.Second,
ForceAttemptHTTP2: true,
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
dest, err := net.ParseDestination(network + ":" + addr)
if err != nil {
@ -90,6 +91,7 @@ func NewDoHLocalNameServer(url *url.URL, clientIP net.IP) *DoHNameServer {
s := baseDOHNameServer(url, "DOHL", clientIP)
tr := &http.Transport{
IdleConnTimeout: 90 * time.Second,
ForceAttemptHTTP2: true,
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
dest, err := net.ParseDestination(network + ":" + addr)
if err != nil {

Loading…
Cancel
Save