Commit 7d977e42 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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: 's avatarRuss Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent b820ef5c
......@@ -33,6 +33,7 @@ var httpClient = http.DefaultClient
var impatientInsecureHTTPClient = &http.Client{
Timeout: 5 * time.Second,
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment