带代理的node.js http代理

时间:2017-05-11 11:22:03

标签: node.js node-modules

var HttpsProxyAgent = require('https-proxy-agent');
this.agent = new HttpsProxyAgent("http://example.proxy.com");

但是我还需要添加set node.js原始代理设置。

http.Agent({ keepAlive: true });

我没有看到使用httpsproxyagent的选项进行设置,因为https-proxy-agent来自agent-base。有没有办法用不同的node.js模块来实现这个目标?

1 个答案:

答案 0 :(得分:0)

我使用了 hpagent 模块。 默认情况下它有 keepAlive: true

https-proxy-agenta PR 可添加此功能