Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ALL_PROXY environment variable #1414

Closed
kidonng opened this issue Dec 26, 2021 · 4 comments
Closed

Support ALL_PROXY environment variable #1414

kidonng opened this issue Dec 26, 2021 · 4 comments

Comments

@kidonng
Copy link

kidonng commented Dec 26, 2021

Quoting Everything curl:

To set a single variable that controls all protocols, the ALL_PROXY exists. If a specific protocol variable one exists, such a one will take precedence.

I (and possibly most people) set HTTP_PROXY and HTTPS_PROXY to be the same anyway, so supporting ALL_PROXY in addition to them seems reasonable.

@benesch
Copy link
Contributor

benesch commented Feb 9, 2022

If you need something that supports this today: https://docs.rs/mz-http-proxy/latest/mz_http_proxy/

@kidonng
Copy link
Author

kidonng commented Feb 9, 2022

Thanks, but I realized this is something more application-specific. Most programs supporting it are using (lib)curl under the hood, and curl has it because it supports tons of protocol, while others are only dealing http(s) and maybe socks(5).

@benesch
Copy link
Contributor

benesch commented Feb 10, 2022

I’m not sure I follow. You can use mz_http_proxy::reqwest::client to get a reqwest client in Deno that’s configured to respect ALL_PROXY and the other proxy env vars. It’s the same reqwest under the hood, just configured to look at the proxy env vars that it otherwise wouldn’t.

It’s not just cURL that supports ALL_PROXY; there’s pretty good support for it across networking stacks in a lot of languages, e.g.: https://pkg.go.dev/golang.org/x/net/proxy#FromEnvironment

@Revanee
Copy link

Revanee commented Apr 25, 2024

This issue should be closed since it was resolved by #1856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants