Proxy authentication mechanism support in cargo
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Problem statement
Currently cargo does not support updating crates index from GitHub behind some types of proxy, e.g. NTLM (which can often be the case for companies that don't allow direct access to GitHub due to corporate security policies).
For example, I am able to download the index manually, via curl, e.g.:
curl -vv --proxy-ntlm -U <user>:<password> --proxy <https://proxy:8080> https://github.com/rust-lang/crates.io-index
But cargo fails to apply the correct authentication mechanism when dealing with the proxy.
Proposed solution
Ideally, it would be nice to be able to to specify in ~/.cargo/config:
[http]
proxy = "host:port" # HTTP proxy to use for HTTP requests (defaults to none)
proxy-auth = "ntlm" # negotiate, basic, digest, etc...
proxy-user = "username"
proxy-password = "password"
...
And cargo should use that config for proxy authentication.
Notes
There are few other proxy authentication (DIGEST, SPNEGO, etc.) methods that curl supports besides the NTLM, so eventually all of them might be supported by cargo.
This feature request was spawned off from Issue 6513
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing cargo's existing HTTP proxy configuration and request handling, then compare its supported authentication with the NTLM, DIGEST, and SPNEGO mechanisms described here. Done means cargo can configure and use the requested proxy authentication for crates.io index updates, with behavior covering the proposed credentials and authentication options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100