-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
Hello,
Thank you for good package.
I want to use utls with proxy and tried this package with context and http.client timeout. But it's not working for me.
requestMaxTimeout := 10 //seconds
ctxTimeout, cancelRequest := context.WithTimeout(context.Background(), time.Second*time.Duration(requestMaxTimeout))
defer cancelRequest()
httpClient = http.Client{
Timeout: time.Second*time.Duration(requestMaxTimeout),
Transport: &http.Transport{Proxy: http.ProxyURL(proxyDetails.ProxyURL),
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}},
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
response, err := httpClient.Do(request.WithContext(ctxTimeout))
Metadata
Metadata
Assignees
Labels
No labels