support chain proxy for h2

This commit is contained in:
Shelikhoo 2021-05-09 15:14:28 +01:00
parent 1038823ee9
commit 7b721e1a6f
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ var (
globalDialerAccess sync.Mutex
)
func getHTTPClient(_ context.Context, dest net.Destination, tlsSettings *tls.Config) *http.Client {
func getHTTPClient(ctx context.Context, dest net.Destination, tlsSettings *tls.Config) *http.Client {
globalDialerAccess.Lock()
defer globalDialerAccess.Unlock()
@ -51,7 +51,7 @@ func getHTTPClient(_ context.Context, dest net.Destination, tlsSettings *tls.Con
}
address := net.ParseAddress(rawHost)
pconn, err := internet.DialSystem(context.Background(), net.TCPDestination(address, port), nil)
pconn, err := internet.DialSystem(ctx, net.TCPDestination(address, port), nil)
if err != nil {
return nil, err
}