-
Notifications
You must be signed in to change notification settings - Fork 409
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
pick up http_proxy
and https_proxy
environment variables
#1347
Comments
I believe this is done. It's released in ureq 2.8.0 (and we're on 2.9.0 now). |
http_proxy
and https_proxy
environment variablesureq
dependency to at least v2.8.0
, to pick up http_proxy
and https_proxy
environment variables
I did the following:
and the tests are negative, none of the network requests picked up proxy envvars... Will do a bit more digging to see if I missed anything. |
I see that wasm-pack and binary-install all calls |
Yes. To use this, create an |
Change
And wasm-pack successfully picked up my proxy env vars. The most simple scenario would be for
If not, then we need to manually construct |
@algesten may I ask why
But most of the tooling I use does do this by default. So why not enable it by default and provide an option for library users to disable instead? |
I understand that it might always been the case for network libs to disable this behavior by default, and the reason why "most of the tooling I use does do this by default" is because the tooling devs manually enabled it. Is this the case? |
The motivation is hidden in the PR. I should probably bring it out in the docs. https://github.com/algesten/ureq/pull/649/files#r1290992185 |
ureq
dependency to at least v2.8.0
, to pick up http_proxy
and https_proxy
environment variableshttp_proxy
and https_proxy
environment variables
💡 Feature description
Pick up
http_proxy
andhttps_proxy
environment variables for all the download tasks (like downloading chromedriver when executingwasm-pack test --chrome --headless
for the first time).This will prevent frustrating network problems like #605 and #1345 , since there is currently no way to set proxy for wasm-pack.
Solution
From what I can tell from the source code,
wasm-pack
both directly and indirectly usesureq
for all the download tasks, indirectly throughbinary-install
.ureq
binary-install
'sureq
dep, and enable (or pass through sincebinary-install
is a lib) related feature flagwasm-pack
'sbinary-install
andureq
dep, enable related feature flagThe text was updated successfully, but these errors were encountered: