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

Add proxy capabilities #101

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add proxy capabilities #101

wants to merge 4 commits into from

Conversation

dotcs
Copy link

@dotcs dotcs commented May 8, 2022

This PR adds support for using a proxy when calling gron <url>. It allows to configure a proxy through the environment variables http_proxy and https_proxy and also respects values in the no_proxy environment variables. Users can always overwrite environment variables by using the two new cli arguments -x/--proxy or --noproxy to overwrite the environment variables (e.g., to disable the proxy). The behavior is similar to curl's behavior.

This PR fixes #89.

It's currently unclear to me if we should add some docs to this - either directly in the Readme or maybe in the advanced section.

Please note: In difference to the behavior of curl, I don't have an option to configure an ALL_PROXY environment variable. Also I don't support an asterisk symbol in the no_proxy environment variable to deactivate the proxy, simply because in this case http_proxy=""/https_proxy="" or gron --proxy "" <url> could be used instead.

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

Successfully merging this pull request may close these issues.

gron URL doesn't use the proxy defined in environment
1 participant