Chromium headless and the proxy settings

1,728 views
Skip to first unread message

Shaun Smith

unread,
Apr 4, 2018, 4:04:10 AM4/4/18
to Chromium-discuss
Hi all,

I'm currently migrating some JS unit tests from using PhantomJS to the headless Chromium browser and have been having trouble getting the headless browser to open our tests. It would experience issues connecting to websockets and long loading times for JS files (>30s per file). I came across a post in a Github page suggesting to add the flags "--proxy-bypass-list=* --proxy-server='direct://' when starting Chromium, which resolved my issues.

Rather than following this solution blindly, I'm wanting to know why this works. From my understanding, the --proxy-server flag specifies the proxy server for all connections, and the --proxy-bypass-list specifies what bypasses the proxy.
I presumed that adding the --no-proxy-server flag would provide the same functionality, but this causes chromium to resort to the aforementioned errors.

What differs between "--proxy-bypass-list=* --proxy-server='direct://' and "--no-proxy-server"? I presumed that the first two contradicted each other.

The tech-stack is: Karma, Jasmine, karma-chrome-runner, and Puppeteer.
The complete list of flags are:
--no-default-browser-check
--no-first-run
--disable-default-apps
--disable-popup-blocking
--disable-translate
--disable-background-timer-throttling
--disable-renderer-backgrounding
--disable-device-discovery-notifications
--sandbox-mode
--disable-gpu
--headless
--remote-debugging-port=9222
--enable-logging
--v=1
--proxy-bypass-list=*
--proxy-server='direct://'

Cheers,
Shaun


Eric Seckler

unread,
Apr 5, 2018, 3:35:16 AM4/5/18
to shaund...@gmail.com, headle...@chromium.org
+headless-dev, bcc chromium-discuss

It looks like --no-proxy-server is implemented in the chrome/ layer, thus not currently supported by headless. Filed https://crbug.com/829247.

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

Reply all
Reply to author
Forward
0 new messages