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

Proxy authentication (username, password) #12

Closed
agarioBotDev opened this Issue May 1, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@agarioBotDev
Copy link

agarioBotDev commented May 1, 2016

Hello,

Is the proxy authentication implemented ? Cannot find it, e.g.a proxy requires username and password else status 407 will be returned...

I would be appreciated for any help,
David

@TooTallNate

This comment has been minimized.

Copy link
Owner

TooTallNate commented May 2, 2016

Do one of these:

In the URI

var proxy = new HttpsProxyAgent('https://username:password@your-proxy.com');

Set the auth option

var proxyOpts = url.parse('https://your-proxy.com');
proxyOpts.auth = 'username:password';
var proxy = new HttpsProxyAgent(proxyOpts);

Set the HTTP header manually

var proxyOpts = url.parse('https://your-proxy.com');
proxyOpts.headers = {
  'Proxy-Authentication': 'Basic ' + new Buffer('username:password').toString('base64')
};
var proxy = new HttpsProxyAgent(proxyOpts);
@agarioBotDev

This comment has been minimized.

Copy link
Author

agarioBotDev commented May 3, 2016

thanks !

@okv

This comment has been minimized.

Copy link

okv commented Oct 30, 2017

Hi, there.
It would be nice to see that at readme page)

@axe312ger

This comment has been minimized.

Copy link

axe312ger commented Feb 22, 2018

Yes please, add this to the readme/docs

@TooTallNate :)

@DuBistKomisch

This comment has been minimized.

Copy link

DuBistKomisch commented Jun 5, 2018

👍 worth mentioning, assumed the options listed would be exhaustive, so had to come digging here to confirm auth works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment