This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git


The following commit(s) were added to refs/heads/master by this push:
     new 98fa493  config: allow web-proxy support
98fa493 is described below

commit 98fa4934c20a2de8d57d206e8cebe12a9eb338ba
Author: Rohit Yadav <[email protected]>
AuthorDate: Thu Jun 18 10:36:46 2020 +0530

    config: allow web-proxy support
    
    Now any of the following env variables may be exported before using
    cmk with any http/https proxy:
    
    export http_proxy='http://user:password@server:3128'
    export https_proxy='http://user:password@server:3128'
    export HTTP_PROXY='http://user:password@server:3128'
    export HTTPS_PROXY='http://user:password@server:3128'
    
    Or, run cmk like following:
    
    HTTP_PROXY="http://IP:port"; cmk
    
    Fixes #49
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 config/config.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/config/config.go b/config/config.go
index 04158cb..664d99b 100644
--- a/config/config.go
+++ b/config/config.go
@@ -153,6 +153,7 @@ func newHTTPClient(cfg *Config) *http.Client {
        client := &http.Client{
                Jar: jar,
                Transport: &http.Transport{
+                       Proxy:           http.ProxyFromEnvironment,
                        TLSClientConfig: &tls.Config{InsecureSkipVerify: 
!cfg.Core.VerifyCert},
                },
        }

Reply via email to