Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 2 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ repository = "https://github.com/rust-lang/rustup"
build = "build.rs"

[features]
curl-backend = ["dep:curl"]
default = ["curl-backend", "reqwest-native-tls", "reqwest-rustls-tls"]
default = ["reqwest-native-tls", "reqwest-rustls-tls"]

vendored-openssl = ['openssl/vendored']

Expand Down Expand Up @@ -50,7 +49,6 @@ clap = { version = "4", features = ["derive", "wrap_help", "string"] }
clap-cargo = "0.18.3"
clap_complete = "4"
console = "0.16"
curl = { version = "0.4.44", optional = true }
effective-limits = "0.5.5"
enum-map = "2.5.0"
env_proxy = { version = "0.4.1", optional = true }
Expand All @@ -63,8 +61,9 @@ indicatif = "0.18"
itertools = "0.14"
libc = "0.2"
opener = "0.8.0"
# `openssl` is used by `curl` or `reqwest` backend although it isn't imported by rustup: this
# allows controlling the vendoring status without exposing the presence of the download crate.
# `openssl` is used by the `reqwest` backend although it isn't imported by
# rustup: this allows controlling the vendoring status without exposing the
# presence of the download crate.
openssl = { version = "0.10", optional = true }
# HACK: Temporarily pinned due to ppc64 ELFv1/v2 ABI issue in 300.5.5, to be
# removed when <https://github.com/openssl/openssl/issues/29815> lands.
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn main() {
// This will work on all supported Windows versions but it relies on
// us using `SetDefaultDllDirectories` before any libraries are loaded.
// See also: src/bin/rustup-init.rs
let delay_load_dlls = ["bcrypt", "api-ms-win-core-synch-l1-2-0"];
let delay_load_dlls = ["api-ms-win-core-synch-l1-2-0"];
for dll in delay_load_dlls {
println!("cargo::rustc-link-arg-bin=rustup-init=/delayload:{dll}.dll");
}
Expand Down
5 changes: 2 additions & 3 deletions ci/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ if [ -n "$INSTALL_BINDGEN" ]; then
export PATH="$CARGO_HOME/bin/bindgen-cli:$PATH"
fi


FEATURES=('--no-default-features' '--features' 'curl-backend,reqwest-native-tls')
FEATURES=('--no-default-features' '--features' 'reqwest-native-tls')
case "$(uname -s)" in
*NT* ) ;; # Windows NT
* ) FEATURES+=('--features' 'vendored-openssl') ;;
Expand Down Expand Up @@ -60,7 +59,7 @@ build_test() {
cmd="$1"
shift

features=('--features' 'curl-backend,reqwest-native-tls')
features=('--features' 'reqwest-native-tls')
case "$TARGET" in
# these platforms aren't supported by aws-lc-rs:
powerpc* ) ;;
Expand Down
41 changes: 14 additions & 27 deletions doc/user-guide/src/network-proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,25 @@ uses a proxy by setting its URL in the environment. In most cases, setting
`https_proxy` should be sufficient. Commands may differ between different
systems and shells:

- On a Unix-like system with a shell like __bash__ or __zsh__:
```bash
export https_proxy=socks5://proxy.example.com:1080
```
- On Windows [__Command Prompt (cmd)__][cmd]:
```cmd
set https_proxy=socks5://proxy.example.com:1080
```
- On Windows [__PowerShell__][ps] (or __PowerShell Core__):
```cmd
$env:https_proxy="socks5://proxy.example.com:1080"
```
- Replace `socks5://proxy.example.com:1080` with
- On a Unix-like system with a shell like **bash** or **zsh**:
```bash
export https_proxy=socks5://proxy.example.com:1080
```
- On Windows [**Command Prompt (cmd)**][cmd]:
```cmd
set https_proxy=socks5://proxy.example.com:1080
```
- On Windows [**PowerShell**][ps] (or **PowerShell Core**):
```cmd
$env:https_proxy="socks5://proxy.example.com:1080"
```
- Replace `socks5://proxy.example.com:1080` with
`http://proxy.example.com:8080` when an HTTP proxy is used instead.

If you need a more complex setup, `rustup` supports the convention used by the
__curl__ program, documented in the ENVIRONMENT section of [its manual
**curl** program, documented in the ENVIRONMENT section of [its manual
page][curlman].

The use of `curl` is presently **deprecated**, however it can still be used by
providing the `RUSTUP_USE_CURL` environment variable, for example:

```bash
RUSTUP_USE_CURL=1 rustup update
```

Note that some versions of `libcurl` apparently require you to drop the
`http://` or `https://` prefix in environment variables. For example, `export
http_proxy=proxy.example.com:1080` (and likewise for HTTPS). If you are
getting an SSL `unknown protocol` error from `rustup` via `libcurl` but the
command-line `curl` command works fine, this may be the problem.

[curlman]: https://curl.se/docs/manpage.html#:~:text=Environment,-The%20environment%20variables
[cmd]: https://en.wikipedia.org/wiki/Cmd.exe
[ps]: https://en.wikipedia.org/wiki/PowerShell
Loading
Loading