mirror of
https://github.com/teacat/chaturbate-dvr.git
synced 2025-10-29 16:59:59 +00:00
DefaultTransport for SOCK5 support #103
This commit is contained in:
parent
e9a2a02494
commit
131870c0e5
@ -28,9 +28,15 @@ func NewReq() *Req {
|
||||
|
||||
// CreateTransport initializes a custom HTTP transport.
|
||||
func CreateTransport() *http.Transport {
|
||||
return &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
// The DefaultTransport allows user changes the proxy settings via environment variables
|
||||
// such as HTTP_PROXY, HTTPS_PROXY.
|
||||
defaultTransport := http.DefaultTransport.(*http.Transport)
|
||||
|
||||
newTransport := defaultTransport.Clone()
|
||||
newTransport.TLSClientConfig = &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
}
|
||||
return newTransport
|
||||
}
|
||||
|
||||
// Get sends an HTTP GET request and returns the response as a string.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user