Cost
Cost

Reputation: 53

socks5 puppeteer node.js with auth

I would like use puppeteer to connect to other websites with socks5 from privadovpn, but when i try connected i receive a message error: "net::ERR_EMPTY_RESPONSE at https://stackoverflow.com/questions/53741694/puppeteer-fails-to-navigate-to-url-err-empty-response"

I guided by this documentation: PrivadoVPN

async function run() {
  const puppeteer = require('puppeteer');

  (async () => {
    const username = 'xxxxx';
    const password = 'xxxx';

    const browser = await puppeteer.launch({
      args: [
        '--proxy-server=mad.socks.privado.io:1080',
        `--proxy-auth=${username}:${password}`
      ],
      headless: false
    },);

    const page = await browser.newPage();

    // await page.authenticate({
    //   username,
    //   password,
    // });

    try{
      await page.setUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)");


    await page.goto('https://stackoverflow.com/questions/53741694/puppeteer-fails-to-navigate-to-url-err-empty-response', {
      networkIdleTimeout: 1000,
      waitUntil: 'networkidle0',
      timeout: 3000000
  });

  // await page.authenticate({ username, password });


    var s = (await page.evaluate(() => document.querySelector('*').outerHTML));


    console.log(s);
    }catch(ex){
      console.log(ex);
    }
    
    //await browser.close();
  })();

}

// 1.73.128.156 3128
run();

i would like know, why i'm reciving this message error.

Upvotes: 0

Views: 215

Answers (0)

Related Questions