diff --git a/README.md b/README.md index ff2502b..3e4bc83 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,20 @@ Calling `akamai update` with no arguments will update _all_ packages installed u Manually upgrade Akamai CLI to the latest version. +#### Using proxy server + +``` +akamai [command] [action] [arguments...] --proxy http://user:password@proxy.io.com:8080 +``` + +Alternatively you can use following commands. Both cases are equal. + +``` +export http_proxy="http://user:password@proxy.io.com:8080" +export https_proxy="http://user:password@proxy.io.com:8080" +akamai [command] [action] [arguments...] +``` + ### Installed Commands To call an installed command, use `akamai [args]`, e.g. diff --git a/akamai.go b/akamai.go index 7dbb457..008676c 100644 --- a/akamai.go +++ b/akamai.go @@ -60,7 +60,7 @@ func createApp() { }, cli.StringFlag{ Name: "proxy", - Usage: "Set a proxy to use", + Usage: "Provide your proxy (http://user:password@proxy.io.com:8080)", }, cli.BoolFlag{ Name: "daemon", @@ -79,10 +79,8 @@ func createApp() { proxy := c.String("proxy") os.Setenv("HTTP_PROXY", proxy) os.Setenv("http_proxy", proxy) - if strings.HasPrefix(proxy, "https") { - os.Setenv("HTTPS_PROXY", proxy) - os.Setenv("https_proxy", proxy) - } + os.Setenv("HTTPS_PROXY", proxy) + os.Setenv("https_proxy", proxy) } if c.IsSet("daemon") {