TooTallNate / superagent-proxy

`Request#proxy(uri)` superagent extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Http auth not workng

tambovchanin opened this issue · comments

Request

request
    .get(url)
    .proxy( {
      host: proxy_ip,
      port: proxy_port,
      protocol: 'http',
      auth:'user:pass'
    })
    .timeout(10000)
    .query(query)
    .end(function(err, res) {
      if (err) debug('Request GET method error', err);
      callback(null, res);
    });

Return an error

Request GET method error +0ms { [Error: getaddrinfo ENOTFOUND proxy_ip:proxy_port]
  code: 'ENOTFOUND',
  errno: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'proxy_ip:proxy_port',
  response: undefined }

Where is my mistake?

Are proxy_ip and proxy_port really the values or are you just censoring them?