9951 explained code solutions for 126 technologies


chrome-headlessHow to use proxy with authentication in headless mode


The simplest way is to use additional proxycnahins utility to implement proxy authentication for Google Chrome headless mode. Mind configuring /etc/proxychains.conf file before usage:

proxychains google-chrome --headless --screenshot="screen.png" "https://onelinerhub.com"ctrl + c
--headless

will launch chrome in headless mode

--screenshot

make screenshot and save it to specified file

proxychains

utility from proxychains package to add proxy functionality to programs