Skip to content

Commit

Permalink
fix(http): Add proxy transport
Browse files Browse the repository at this point in the history
  • Loading branch information
sylus committed Dec 17, 2016
1 parent af9680e commit 2dff6c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2dff6c9

Please sign in to comment.