3
3
Enterprise networks often don't have direct outside HTTP access, but enforce
4
4
the use of proxies. If you're on such a network, you can request that ` rustup `
5
5
uses a proxy by setting its URL in the environment. In most cases, setting
6
- ` https_proxy ` should be sufficient. On a Unix-like system with a shell like
7
- __ bash__ or __ zsh__ , you could use:
8
-
9
- ``` bash
10
- export https_proxy=socks5://proxy.example.com:1080 # or http://proxy.example.com:8080
11
- ```
12
-
13
- On Windows, the command would be:
14
-
15
- ``` cmd
16
- set https_proxy=socks5://proxy.example.com:1080
17
- ```
6
+ ` https_proxy ` should be sufficient. Commands may differ between different
7
+ systems and shells:
8
+
9
+ - On a Unix-like system with a shell like __ bash__ or __ zsh__ :
10
+ ``` bash
11
+ export https_proxy=socks5://proxy.example.com:1080
12
+ ```
13
+ - On Windows [ __ Command Prompt (cmd)__ ] [ cmd ] :
14
+ ``` cmd
15
+ set https_proxy=socks5://proxy.example.com:1080
16
+ ```
17
+ - On Windows [ __ PowerShell__ ] [ ps ] (or __ PowerShell Core__ ):
18
+ ``` cmd
19
+ $env:https_proxy="socks5://proxy.example.com:1080"
20
+ ```
21
+ - Replace ` socks5://proxy.example.com:1080 ` with
22
+ ` http://proxy.example.com:8080 ` when an HTTP proxy is used instead.
18
23
19
24
If you need a more complex setup, ` rustup ` supports the convention used by the
20
25
__ curl__ program, documented in the ENVIRONMENT section of [ its manual
@@ -34,3 +39,5 @@ getting an SSL `unknown protocol` error from `rustup` via `libcurl` but the
34
39
command-line ` curl ` command works fine, this may be the problem.
35
40
36
41
[ curlman ] : https://curl.haxx.se/docs/manpage.html
42
+ [ cmd ] : https://en.wikipedia.org/wiki/Cmd.exe
43
+ [ ps ] : https://en.wikipedia.org/wiki/PowerShell
0 commit comments