Use proxies from environment when making outbound http connections (#478)

Fixes #477
This commit is contained in:
Philippe M. Chiasson 2018-01-25 11:10:08 -05:00 committed by Matt Holt
parent cc326ce155
commit 6bddbfd17a

View file

@ -18,6 +18,7 @@ var UserAgent string
// HTTPClient is an HTTP client with a reasonable timeout value. // HTTPClient is an HTTP client with a reasonable timeout value.
var HTTPClient = http.Client{ var HTTPClient = http.Client{
Transport: &http.Transport{ Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{ Dial: (&net.Dialer{
Timeout: 30 * time.Second, Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second, KeepAlive: 30 * time.Second,