Skip to content

Commit 1b2adbe

Browse files
committedDec 7, 2024·
Document HTTP PROXY for dist-source rust-changelog
1 parent fc0ac71 commit 1b2adbe

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed
 

‎book/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [Installation](./getting-started/installation.md)
66
- [Quick Start](./getting-started/quick-start.md)
77
- [Cargo Workspace](./getting-started/cargo-workspace.md)
8+
- [HTTP PROXY](./getting-started/rust-releases-proxy.md)
89
- [Releases](releases/index.md)
910
- [v0.15 to v0.16](releases/v0.15_v0.16_highlights.md)
1011
- [v0.15 to v0.16 JSON](releases/v0.15_v0.16_json.md)

‎book/src/getting-started/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
* [Installation](installation.md)
44
* [Quick Start](quick-start.md)
5-
* [Cargo Workspace](cargo-workspace.md)
5+
* [Cargo Workspace](cargo-workspace.md)
6+
* [HTTP PROXY](rust-releases-proxy.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
### Rust Releases: HTTP PROXY
2+
3+
`cargo-msrv` depends on the [rust-releases](https://github.com/foresterre/rust-releases/) crate to determine which Rust versions exist. This is a necessary evil for
4+
the `cargo msrv find` and `cargo msrv verify` subcommands.
5+
6+
To fetch an index of known Rust releases, it accesses the network. By default, the Rust GitHub repository is used to determine
7+
which stable releases and toolchains are available. As an alternative, this data can also be fetched from the Rust AWS S3
8+
distribution bucket.
9+
10+
The source can be set with the `--release-source <source>` flag. The possible values are respectively `rust-changelog` and `rust-dist`,
11+
for the Rust GitHub repository and the Rust AWS S3 distribution bucket. For example: `cargo msrv find --release-source rust-changelog`.
12+
13+
14+
15+
#### Release source: `rust-changelog`
16+
17+
[rust-releases](https://github.com/foresterre/rust-releases/) uses [ureq](https://crates.io/crates/ureq) as HTTP client
18+
for the `rust-changelog` source. From `cargo-msrv 0.17.1` (and [rust-releases 0.29.0](https://github.com/foresterre/rust-releases/releases/tag/v0.29.0)
19+
respectively), `ureq` has been configured to support configuring a network proxy from the environment.
20+
21+
The environment variable, `ureq` uses [are](https://docs.rs/ureq/2.11.0/src/ureq/proxy.rs.html#87-92):
22+
23+
- `ALL_PROXY` or `all_proxy` or,
24+
- `HTTPS_PROXY` or `https_proxy` or,
25+
- `HTTP_PROXY` or `http_proxy`
26+
27+
The environment variable can be configured as follows:
28+
29+
`<protocol>://<user>:<password>@<host>:port`, where all parts except host are optional.
30+
31+
The `<protocol>` must be one of: `http` (`socks4`, `socks4a` and `socks5` are currently not enabled). The default is `http`.
32+
33+
The default `<port>` is 80 when the `<protocol>` is `http` .
34+
35+
Examples:
36+
- `localhost`
37+
- `http://127.0.0.1:8080`
38+
39+
40+
#### Release source: `rust-dist`
41+
42+
TODO: Not configured specifically by cargo-msrv, but could be the case.
43+
44+
The following crates are used for the `rust-dist` source:
45+
46+
- [aws-config](https://crates.io/crates/aws-config)
47+
- [aws-sdk-s3](https://crates.io/crates/aws-sdk-s3)
48+
49+
Probably also relevant as transitive dependencies are:
50+
51+
- [aws-smithy-http](https://crates.io/crates/aws-smithy-http)

0 commit comments

Comments
 (0)
Please sign in to comment.