繁体   English   中英

带代理的 node.js http 代理

[英]node.js http agent with proxy

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 模块来实现这一点?

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

https-proxy-agent一个 PR来添加这个功能

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM