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

Feature request: Ignore PROXY ENVIRONMENT on Windows #296

Open
oryon-dominik opened this issue Dec 13, 2022 · 1 comment
Open

Feature request: Ignore PROXY ENVIRONMENT on Windows #296

oryon-dominik opened this issue Dec 13, 2022 · 1 comment
Labels
good first issue Good for newcomers

Comments

@oryon-dominik
Copy link

xh behaves differently from curl considering PROXY environment variables.
On Windows xh reads proxy settings form the registry (that's unexpected from curl).

Need an option to force --NO-PROXY.

@ducaale
Copy link
Owner

ducaale commented Dec 13, 2022

It is most likely that curl will support system proxy on windows in the future.

We are open to adding something similar to cURL's --noproxy option but In the meantime, you can use NO_PROXY env variable to prevent xh from using the system proxy

PS> $env:NO_PROXY = '*'
PS> xh example.com

Edit: reqwest v0.11.14 has added an API to specifying proxy exclusion list. This allows us to support cURL's --noproxy <no-proxy-list> option in xh.

let proxy = reqwest::Proxy::https("http://localhost:1234")?
    .no_proxy(reqwest::NoProxy::from_string("*"));

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

No branches or pull requests

2 participants