xh icon indicating copy to clipboard operation
xh copied to clipboard

Feature request: Ignore PROXY ENVIRONMENT on Windows

Open oryon-dominik opened this issue 3 years ago • 1 comments

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.

oryon-dominik avatar Dec 13 '22 10:12 oryon-dominik

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("*"));

ducaale avatar Dec 13 '22 17:12 ducaale