question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Proxy with auth" example not working.

See original GitHub issue

Hi, i tried the proxy with auth example and got a 400 Bad Request response. Then i changed the path: parsed.href to path: parsed.path now i get the error To many redirects does anybody else got it to work?

Here is a test Proxy if smbd. want to test. {“host”:“217.29.63.224”,“port”:“10798”,“user”:“SgpHms”,“pass”:“6QQu3N”}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
fentcommented, Dec 8, 2019

I just tried a couple of random proxies from there, took a few minutes to start up but eventually it did start downloading.

const ytdl = require('..');
const Agent = require('https-proxy-agent');

const host = '177.54.130.149';
const port = '59044';
const proxy = `http://${host}:${port}`;
const agent = new Agent(proxy);
const stream = ytdl('https://www.youtube.com/watch?v=2UBFIhS1YBk', {
  requestOptions: { agent }
});

console.log('Starting Download');

stream.on('data', (chunk) => {
  console.log('downloaded', chunk.length);
});

stream.on('end', () => {
  console.log('Finished');
});

I noticed that the ones that don’t support https give an error, even if I try using the request module just to make sure

const request = require('request');

const url = 'https://www.youtube.com/watch?v=2UBFIhS1YBk';
const host = '188.226.141.127';
const port = '3128';
const proxy = `http://${host}:${port}`;

request({ url, proxy }, (err, res) => {
  if (err) throw err;
  console.log('got res', res.statusCode);
});
1reaction
DonikaVcommented, Dec 8, 2019

Just tried again and it works! thanks!! you made my evening!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems in proxy Authentication (SOLVED)
In some cases the "proxy authentication failed" issue might be caused by the incompatibility between the proxy server and the clients. In that ......
Read more >
Proxy server with authentication not working at command line
I'm running Debian 6 in a VM on a network that requires Windows authentication to a proxy server before it can run any...
Read more >
Problem Proxy server authentication failure - TechDocs
This problem might occur when the authentication credentials provided for proxy server authentication are invalid.
Read more >
How To Fix HTTP Error 407 "Proxy Authentication Required"
The “407 Proxy Authentication Required” error occurs when the server is unable to complete a request. This happens due to a lack of ......
Read more >
Guide to Solving Proxy Status Errors
Normally, the code reveals what kind of proxy issues you've run into. ... It happens when your scraping tool is not authenticated correctly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found