-
Notifications
You must be signed in to change notification settings - Fork 34
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
[BUG] maxSockets option not respected for proxied connections #59
Comments
after some investigation, setting the |
It does not seem the maintainer of Proxy server are heavily used in corporate networking environment. Without KeepAlive and connection pooling, it is almost always going to create a DoS. make-fetch-happen/lib/agent.js Lines 172 to 174 in ea71110
I wonder if |
I think it's worth switching to |
This should be fixed by the latest version of @silverwind if you are still seeing issues, please open a new issue (or i can transfer this one and reopen it) over at https://github.com/npm/agent/issues/new/choose |
What / Why
The maxSocket option does not appear to be respected in case a HTTPS proxy is in use, e.g. on a typical
npm install
, a proxy may be bombarded with hundrets of parallel requests, potentially overloading it.I think the issue is that this module passes
maxSockets
tohttps-proxy-agent
via the constructor, but that module does not support such a constructor option. It may be possible to set it viaagent.maxSockets
after agent instantiation, see TooTallNate/proxy-agents#105.When
When a
HTTPS_PROXY
environment variable is set to a proxy, meaninghttps-proxy-agent
is being used.Where
On
npm install
How
Current Behavior
Proxy is being bombarded with unbound number of parallel requests
Steps to Reproduce
HTTPS_PROXY=https://localhost:3128 npm install
on a sizeable projectExpected Behavior
Parallel requests to the proxy limited to 15 (the current default)
The text was updated successfully, but these errors were encountered: