TooTallNate / node-proxy-agent

Maps proxy protocols to `http.Agent` implementations
285 stars 69 forks source link

Proper Syntax for adding Certifications? #43

Closed PurpleMonkeyWrench closed 1 year ago

PurpleMonkeyWrench commented 5 years ago

What would be the proper syntax to add certifications to the proxy agent? This does not seem to set the ca value:

const fs = require('fs');
const proxy = require('proxy-agent');

const certs = [
  fs.readFileSync('C:\\Users\\username\\Certificates\\my_pem.pem')
];

AWS.config.update({
  region: 'us-west-1',
  httpOptions: {
    agent: proxy("http://myproxy.com:80/", { ca: certs })
  }
});
trivikr commented 4 years ago

Hi, any update on this question?

trivikr commented 4 years ago

I noticed this test code passing cert https://github.com/TooTallNate/node-proxy-agent/blob/10ff67b88644261a01dc68bcf7bc59f210601459/test/test.js#L69-L80

trivikr commented 4 years ago

AWS JavaScript SDK has Developer Guide on registering certs at https://docs.aws.amazon.com/en_pv/sdk-for-javascript/v2/developer-guide/node-registering-certs.html

mihkelKuuskull commented 1 year ago

Hey, this seems to still be an issue, any update?

TooTallNate commented 1 year ago

This code in this repository has been moved to the proxy-agents monorepo, so I am closing this pull request. If you feel that this issue still exists as of the latest release, feel free to open a new issue over there.