3 * Copyright 2017 Google Inc.
4 * SPDX-License-Identifier: Apache-2.0
9 const puppeteer
= require('puppeteer');
12 const browser
= await puppeteer
.launch({
13 // Launch chromium using a proxy server on port 9876.
15 // https://www.chromium.org/developers/design-documents/network-settings
17 '--proxy-server=127.0.0.1:9876',
18 // Use proxy for localhost URLs
19 '--proxy-bypass-list=<-loopback>',
22 const page
= await browser
.newPage();
23 await page
.goto('https://google.com');
24 await browser
.close();