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 <rohit.yadav@shapeblue.com>
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 @@ client := &http.Client{ Jar: jar, Transport: &http.Transport{ + Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{InsecureSkipVerify: !cfg.Core.VerifyCert}, }, }