There is this page which I can only access with proxy and certificate.
So is there a way to send a http request with proxy and certificate?
I have tried https-proxy-agent but it does not seem like it supports certificates.
const agentWithProxyAndCertificate = (proxy, certificateFilePath) => {
const cert = fsSync.readFileSync(certificateFilePath);
return new HttpsProxyAgent({
key: cert,
cert,
...parseUrl(proxy),
});
};
const httpsAgent = agentWithProxyAndCertificate(US_PROXY, `${__dirname}/cert.pem`);
const client = new HttpClient({ agent: httpsAgent, cookieJar: true });
Is there any other way to do this in Node.js?