Skip to content

Commit 9849424

Browse files
authored
Update proxy setting section
There are two changes: 1. Use `https_proxy` rather than `http_proxy` because the latter doesn't work at all. All traffic from rustup seems to go via https. 2. Use SOCKS proxy as example, since it is nowadays more widely-used (thanks to GFW in China) and more powerful. Also, avoiding using two `http`s makes it more obvious that other proxy types are also supported without needing to check the manual of curl.
1 parent 7b3e8fb commit 9849424

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -421,22 +421,22 @@ is invoked for a custom toolchain and it is not available, `rustup`
421421
will attempt to use `cargo` from one of the release channels*,
422422
preferring 'nightly', then 'beta' or 'stable'.
423423

424-
## Working with HTTP proxies
424+
## Working with network proxies
425425

426426
Enterprise networks often don't have direct outside HTTP access, but enforce
427-
the use of HTTP proxies. If you're on such a network, you can request that
427+
the use of proxies. If you're on such a network, you can request that
428428
rustup uses a proxy by setting its URL in the environment. In most cases,
429-
setting `http_proxy` should be sufficient. On a Unix-like system with a
429+
setting `https_proxy` should be sufficient. On a Unix-like system with a
430430
shell like __bash__ or __zsh__, you could use:
431431

432432
```
433-
export http_proxy=http://proxy.example.com:8080
433+
export https_proxy=socks5://proxy.example.com:1080 # or http://proxy.example.com:8080
434434
```
435435

436436
On Windows, the command would be:
437437

438438
```
439-
set http_proxy=http://proxy.example.com:8080
439+
set https_proxy=socks5://proxy.example.com:1080
440440
```
441441

442442
If you need a more complex setup, rustup supports the convention used by

0 commit comments

Comments
 (0)