ERR_TUNNEL_CONNECTION_FAILED when running puppeteer with proxy chain package

I running this code on Linux VPS:
const puppeteer = require('puppeteer');
const proxyChain = require('proxy-chain');

(async () => {
    const oldProxyUrl = 'http://auto:apify_proxy_XXXXXXX@proxy.apify.com:8000';
    const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);

    console.log(newProxyUrl);

    const browser = await puppeteer.launch({
        args: [`--proxy-server=${newProxyUrl}`],
    });

    // Do your magic here...
    const page = await browser.newPage();
    await page.goto('https://www.example.com');
})();
But getting this error: Error: net::ERR_TUNNEL_CONNECTION_FAILED at https://www.google.com/
Was this page helpful?