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.
I noticed that in version 7, proxy config does not take effect. So this pull
request make proxy config can work, and amend the relevant docs. Code changing
are tested (since I write a socks5/http proxy server by myself, so effect
can be checked easily).
Docs change for these reasons:
motivation of this pull request. A few weeks ago, I want use npm through socks5
proxy, but the npm documentation does not mention that, and google searching
results say that I need handle trans http request to socks proxy server
in the outside of npm. Such as Running NPM install behind a socks5 proxy npm#6204 saying.
After lots of source code reading and crunching, I find that npm ACTUALLY CAN be
used behind socks proxy, but only docs does not say that (Notice that npm
version 7 does not take any proxy effect which as I know is a beta version
for now).
but only for http request(yes, I read make-fetch-happen source code ;-]).
Since almost all real request is https rather than http, for the sake of
simplicity, I delete 'http_proxy' description part.
npm config set noproxy 'an array of domain extensions'
. So I amend that too.References
Fixes npm/npm#6204