Closed sm2017 closed 4 years ago
Could the keepAlive parameter be included on this too?
I just find a work around for this. As the Agent is being created with the http.Agent
you can access to its properties and set them.
const httpsAgentProxyAgent = new HttpsProxyAgent("http://0.0.0.0:8080");
httpsAgentProxyAgent.maxSockets = 40;
I still think it would be nice to have it as a parameter when creating the proxyAgent instance.
@Rasfuranku
As the Agent is being created with the http.Agent
How you find that it created with the http.Agent, Can you show me the source?
It is using the agent-base
library which is an http.Agent
generator.
agent-base: https://github.com/TooTallNate/node-agent-base#readme
Magic happens here:
https://github.com/TooTallNate/node-agent-base/blob/bc0f58c1f02f545acd1a6bd887ed5b06b50874a9/src/index.ts#L91
How can I set maxSockets?