Ask Your Question

Revision history [back]

Here are a few ways to potentially increase the speed of the Chromium loading process while using Puppeteer and bypassing the proxy check:

  1. Disable unnecessary features: By disabling features that are not required for your use case, you can improve the performance of Chromium. You can use the --disable-extensions flag to disable all extensions, and the --disable-background-networking flag to disable background networking.

  2. Use a headless browser: Using a headless browser can significantly reduce the load time of Chromium. You can use the headless: true option in the Puppeteer configuration to instruct the browser to run in headless mode.

  3. Disable image loading: You can disable the loading of images in Chromium by using the --blink-settings=imagesEnabled=false flag. This can improve the performance, especially on slow network connections.

  4. Use a CDN for dependencies: If your application has dependencies that are loaded over the network, you can improve their load time by using a CDN.

  5. Use a faster network connection: If possible, you can connect to a faster network connection to speed up the loading of Chromium and other resources.

Bypassing the proxy check can be done by setting the proxy configuration to use a direct connection. Here's an example:

const browser = await puppeteer.launch({
  args: [
    '--no-sandbox',
    '--disable-setuid-sandbox',
    '--proxy-server="direct://"',
    '--proxy-bypass-list=*'
  ]
})

This will instruct Chromium to bypass the proxy and use a direct connection.