Skip to content

Download TimedOut on company firewall #4439

@Friz64

Description

@Friz64

Verification

Problem

Our company firewall takes a while to unpack and verify the files downloaded through rustup.

$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2025-08-07, rust version 1.89.0 (29483883e 2025-08-04)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
error: failed to download file error=Reqwest(reqwest::Error { kind: Request, url: "https://static.rust-lang.org/dist/2025-08-07/rust-docs-1.89.0-x86_64-unknown-linux-gnu.tar.xz", source: TimedOut })
info: retrying download for 'https://static.rust-lang.org/dist/2025-08-07/rust-docs-1.89.0-x86_64-unknown-linux-gnu.tar.xz'
^C⏎                                                                                                                     

I found that rust-docs is especially susceptible. I timed its download, and it took 71 seconds before it was approved and the first bytes were transferred in the download.

The timeout is currently hardcoded to 30 seconds:

.read_timeout(Duration::from_secs(30))

Steps

Run rustup on a network with an HTTPS proxy that delays downloads by verifying them. I unfortunately don't have any details on my corporations firewall.

Possible Solution(s)

Ideally the timeout should be increased, and/or be made configurable.

Notes

A workaround is to use the curl backend, which has a higher timeout.

$ RUSTUP_USE_CURL=1 rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
warn: RUSTUP_USE_CURL is set; the curl backend is deprecated,
            please file an issue if the default download backend does not work for your use case
warn: RUSTUP_USE_CURL is set; the curl backend is deprecated,
            please file an issue if the default download backend does not work for your use case
info: latest update on 2025-08-07, rust version 1.89.0 (29483883e 2025-08-04)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
warn: RUSTUP_USE_CURL is set; the curl backend is deprecated,
            please file an issue if the default download backend does not work for your use case
info: downloading component 'rust-std'
...

Rustup version

1.28.2

Installed toolchains

stable-x86_64-unknown-linux-gnu

OS version

WSL2 Debian 12 bookworm

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions