Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for using a proxy when calling
gron <url>
. It allows to configure a proxy through the environment variableshttp_proxy
andhttps_proxy
and also respects values in theno_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 anALL_PROXY
environment variable. Also I don't support an asterisk symbol in theno_proxy
environment variable to deactivate the proxy, simply because in this casehttp_proxy=""
/https_proxy=""
orgron --proxy "" <url>
could be used instead.