TUN-3896: http-service and tunnelstore client use http2 transport.

- If origin services are http2 and https is the service url, http2
   transport is preferred.

   - The tunnelstore client is now upgraded to use http2.
This commit is contained in:
Sudarsan Reddy
2021-03-26 09:45:26 +00:00
parent 66da530ba3
commit 1cf6ae37eb
3 changed files with 31 additions and 5 deletions

View File

@@ -15,6 +15,8 @@ import (
"github.com/pkg/errors"
"github.com/rs/zerolog"
"golang.org/x/net/http2"
"github.com/cloudflare/cloudflared/hello"
"github.com/cloudflare/cloudflared/ipaccess"
"github.com/cloudflare/cloudflared/socks"
@@ -287,6 +289,7 @@ func newHTTPTransport(service originService, cfg OriginRequestConfig, log *zerol
httpTransport.DialContext = dialContext
}
http2.ConfigureTransport(&httpTransport)
return &httpTransport, nil
}