【问题标题】:node.js http agent with proxy带代理的 node.js http 代理
【发布时间】:2021-01-28 17:20:20
【问题描述】:
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 模块来实现这一点?

【问题讨论】:

    标签: node.js node-modules


    【解决方案1】:

    我使用了hpagent 模块。 默认有keepAlive: true

    https-proxy-agenta PR 添加此功能

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-01
      • 1970-01-01
      • 2016-04-26
      • 2015-07-23
      • 2018-07-28
      • 1970-01-01
      • 1970-01-01
      • 2015-01-21
      相关资源
      最近更新 更多