-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
lib: Match proxy support with request
module
#1978
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
request
modulerequest
module
It's unfortunate we have to include so much additional logic just to get proper no_proxy support, we're basically digging a bigger hole because of the support for non-standard methods of specifying proxies. One option might be to just rip it out and tell the user to just use standard Regarding the breaking change - would it really be breaking? In this and the current version, I could imagine some weirdness if you had a proxy setting that didn't pass our basic regex: |
This is actually why I am here, the only way I make proxies work is to not specify them outside env var.
Exactly, which is why |
@rvagg anything pending here? |
PR-URL: #1978 Reviewed-By: Rod Vagg <rod@vagg.org>
landed in 3bcba2a, labelled semver-minor |
PR-URL: #1978 Reviewed-By: Rod Vagg <rod@vagg.org>
Checklist
npm install && npm test
passesDescription of change
Per #1176 (comment), closes #1751
When using the
no_proxy
environmental variable I noticed that some installations would fail whenNODE_CONFIG_PROXY
was set (or its equivalent). From inspecting this code plus how its dependency, https://github.com/request/request, I noticed it already has full proxy support. Changing env itself might lead to side effects.--proxy
to blockingno_proxy
from https://github.com/request/request/blob/212570b6971a732b8dd9f3c73354bcdda158a737/request.js#L276-L278no_proxy
support through CLI--noproxy
or equivalent NPM alternatives.proxy
effectively blockshttps_proxy
currently, this also unblocks that variable (which would override ourproxy
variable). However I am mirroring thehttp_proxy
andhttps_proxy
definitions and then letting the dependency to pick either. (Implemention downstream in: https://github.com/request/request/blob/212570b6971a732b8dd9f3c73354bcdda158a737/lib/getProxyFromURI.js#L40)