mirror of
https://github.com/golang/go
synced 2024-11-11 19:21:37 -07:00
cmd/go: use ProxyFromEnvironment in -insecure mode also
Be consistent on whether the http proxy environment variables are respected regardless of whether -insecure is used. Updates #18519 Change-Id: Ib157eaacfd342dd3bfcd03e64da18c98c609cae3 Reviewed-on: https://go-review.googlesource.com/34818 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
b820ef5c33
commit
7d977e4279
@ -33,6 +33,7 @@ var httpClient = http.DefaultClient
|
|||||||
var impatientInsecureHTTPClient = &http.Client{
|
var impatientInsecureHTTPClient = &http.Client{
|
||||||
Timeout: 5 * time.Second,
|
Timeout: 5 * time.Second,
|
||||||
Transport: &http.Transport{
|
Transport: &http.Transport{
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user