fix(http): Add proxy transport

This commit is contained in:
William Hearn
2016-12-17 14:13:20 -05:00
parent 5df5a39405
commit 72c78c6c1c
+5
View File
@@ -63,6 +63,11 @@ func New(opts map[string]interface{}) *Cli {
transport.TLSClientConfig.InsecureSkipVerify = insecureSkipVerify
}
if os.Getenv("HTTP_PROXY") != "" {
proxyURL, _ := url.Parse(os.Getenv("HTTP_PROXY"))
transport.Proxy = http.ProxyURL(proxyURL)
}
ua = &http.Client{
Jar: cookieJar,
Transport: transport,