Explorar o código

dsl: set ForceAttemptHTTP2 to true

http Transpoter disabled http/2 by default if TLSClientConfig is set
Amir Khan hai 2 días
pai
achega
ff7cd8460a
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      psiphon/common/dsl/relay.go

+ 2 - 0
psiphon/common/dsl/relay.go

@@ -224,6 +224,7 @@ func (r *Relay) Reload() (bool, error) {
 		r.httpClient = &http.Client{
 			Transport: &http.Transport{
 				TLSClientConfig:     r.tlsConfig,
+				ForceAttemptHTTP2:   true,
 				MaxConnsPerHost:     httpTransport.MaxConnsPerHost,
 				MaxIdleConns:        httpTransport.MaxIdleConns,
 				MaxIdleConnsPerHost: httpTransport.MaxIdleConnsPerHost,
@@ -281,6 +282,7 @@ func (r *Relay) SetRequestParameters(
 		r.httpClient = &http.Client{
 			Transport: &http.Transport{
 				TLSClientConfig:     r.tlsConfig,
+				ForceAttemptHTTP2:   true,
 				MaxConnsPerHost:     maxHttpConns,
 				MaxIdleConns:        maxHttpIdleConns,
 				MaxIdleConnsPerHost: maxHttpIdleConns,