Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set secureOptions #243

Open
user9435213451 opened this issue Aug 29, 2023 · 5 comments
Open

Can't set secureOptions #243

user9435213451 opened this issue Aug 29, 2023 · 5 comments

Comments

@user9435213451
Copy link

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

@ciarans
Copy link

ciarans commented Sep 26, 2023

Same here :(

@vladkrasn
Copy link

Same here!

@vladkrasn
Copy link

vladkrasn commented Apr 11, 2024

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

@ekzyis
Copy link

ekzyis commented Apr 30, 2024

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

@lukekarrys
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants