-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
I have a concern that came up in tealdeer here: tealdeer-rs/tealdeer#450 (comment)
In Proxy::try_from_env, the environment variables all_proxy, https_proxy, and http_proxy are checked, in this order:
Lines 211 to 218 in 428bba8
| const TRY_ENV: &[&str] = &[ | |
| "ALL_PROXY", | |
| "all_proxy", | |
| "HTTPS_PROXY", | |
| "https_proxy", | |
| "HTTP_PROXY", | |
| "http_proxy", | |
| ]; |
However, doesn't it make more sense to prefer the more specific https_proxy variable over the general all_proxy one? Additionally, should https_proxy and http_proxy even be used for for HTTP and HTTPS requests respectively?
For reference, the described behavior is what happens in hyper-util, and thus, reqwest: https://github.com/hyperium/hyper-util/blob/d91ea8efe6f3b09cc2fd6cc9e303566bd887a3ea/src/client/proxy/matcher.rs#L315-L319
Thanks for the library!
Metadata
Metadata
Assignees
Labels
No labels