diff --git a/README.md b/README.md index cfb37d6..45418ae 100644 --- a/README.md +++ b/README.md @@ -215,11 +215,9 @@ The most common example is from users in China who can define: export N_NODE_MIRROR=https://npm.taobao.org/mirrors/node -If the custom mirror requires authentication you can [url encode](https://urlencode.org/) the credentials into the URL: +If the custom mirror requires authentication you can add the [url-encoded](https://urlencode.org) username and password into the URL. e.g. - https://username:password@host:port/path - -The encoding is especially important when the username or password contains special characters. + export N_NODE_MIRROR=https://encoded-username:encoded-password@host:port/path There is also `N_NODE_DOWNLOAD_MIRROR` for a different mirror with same layout as the default . diff --git a/docs/proxy-server.md b/docs/proxy-server.md index 394035e..e02dafa 100644 --- a/docs/proxy-server.md +++ b/docs/proxy-server.md @@ -6,11 +6,11 @@ Under the hood, `n` uses `curl` or `wget` for the downloads. `curl` is used if a You can define the proxy server using an environment variable, which is read by multiple commands including `curl` and `wget`: - export https_proxy='http://host:port/path' + export https_proxy='https://host:port/path' -If your proxy requires authentication you can [url-encode](https://urlencode.org) the username and password in the URL. e.g. +If your proxy requires authentication you can add the [url-encoded](https://urlencode.org) username and password into the URL. e.g. - export https_proxy='http://user:password@host:port/path' + export https_proxy='https://encoded-user:encoded-password@host:port/path' If you have defined a custom node mirror which uses http, then you would define `http_proxy` rather than `https_proxy`.