From 1649da8245dd4e956301a7940e2e606caa941341 Mon Sep 17 00:00:00 2001 From: zhengtianbao Date: Tue, 26 Oct 2021 09:57:29 +0800 Subject: [PATCH] docs: Document proxy environment variable usage. (#733) * docs: Document proxy environment variable usage. * fix typo in proxy setting doc --- site/content/docs/user-guide/configuration.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/site/content/docs/user-guide/configuration.md b/site/content/docs/user-guide/configuration.md index 3d2a023b..81a7534d 100644 --- a/site/content/docs/user-guide/configuration.md +++ b/site/content/docs/user-guide/configuration.md @@ -43,4 +43,17 @@ variable in your `~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`: export KREW_DEFAULT_INDEX_URI='git@github.com:foo/custom-index.git' ``` +## Configure network proxy {#custom-network-proxy} + +If you want to use Krew with an HTTP proxy, you can configure environment +variables HTTP_PROXY, HTTPS_PROXY and NO_PROXY. Behavior of these +environment variables are explained [here][httpproxy]. + +```shell +export HTTP_PROXY="proxy-ip:port" +export HTTPS_PROXY="proxy-ip:port" +export NO_PROXY="ip1,ip2:port2,.example.com" +``` + [ki]: https://github.com/kubernetes-sigs/krew-index +[httpproxy]: https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config