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 http_proxy and https_proxy environment variables #394

Open
gmile opened this issue Jul 21, 2024 · 1 comment
Open

Support http_proxy and https_proxy environment variables #394

gmile opened this issue Jul 21, 2024 · 1 comment

Comments

@gmile
Copy link

gmile commented Jul 21, 2024

It would be great if Req supported reading http_proxy and https_proxy environment variables out of the box. A use case I have in mind is being able to debug HTTP interaction in programs that use Req as an HTTP client. For example, via tools like mitmproxy.

In my own programs, I can use proxy settings introduced in #149 or even go as far as to use System.get_env to optionally read http_proxy and https_proxy ENV vars. However, for packages that rely on Req this may be much harder and requi modification of the package's source code (unless I am missing something, of course).

P.S. I am not sure if this is the right place to file an issue, or if it should be Finch 🙈 Mint issue tracker would not the right place, it seems (based on elixir-mint/mint#92)

@wojtekmach
Copy link
Owner

Yes, PRs appreciated!

I think we should support http_proxy env var out of the box but also have an :http_proxy option that can be set with the same value. (Same goes for https.) WDYT?

This recently came up with https://elixirforum.com/t/making-a-req-request-with-proxy/65771/2.

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

2 participants