Open user9435213451 opened 10 months ago
Same here :(
Same here!
Managed to get rid of my "unsafe legacy renegotiation disabled" error using this:
import { constants } from "node:crypto";
import { HttpsProxyAgent } from "https-proxy-agent";
const proxyAgent = new HttpsProxyAgent(`http://one:123`);
proxyAgent.connectOpts.secureOptions = constants.SSL_OP_LEGACY_SERVER_CONNECT;
proxyAgent.options.secureOptions = constants.SSL_OP_LEGACY_SERVER_CONNECT;
Still, it's weird that this project doesn't mirror all the constructor properties of https.agent
HttpsProxyAgent
uses http.Agent
under the hood as mentioned in the README:
This module provides an
http.Agent
implementation that connects to a specified HTTP or HTTPS proxy server
Still, it's weird that this project doesn't mirror all the constructor properties of https.agent
I opened #304 about parity between a possible https base agent and the core https agent in Node. It would be good to get more use cases in that issue to decide if it's worth working on.
When im using https.agent, setting secureOptions works fine. But in HttpsProxyAgent it does just nothing and I'm still getting "unsafe legacy renegotiation disabled" error. Please fix it, i need to use proxy and can't switch to basic https.agent