3 ms·
I was stuck last time I was using headless chrome when I needed to use a proxy with an username and a paasword. Headless chrome just doesn't support it. Any cha
by hartator 9y ago
I was stuck last time I was using headless chrome when I needed to use a proxy with an username and a paasword. Headless chrome just doesn't support it. Any changes on that?
- jancurn 9y agoThere's a workaround - https://blog.apify.com/how-to-make-headless-chrome-and-puppeteer-use-a-proxy-server-with-authentication-249a21a79212 https://blog.apify.com/how-to-make-headless-chrome-and-puppe...
- hartator 9y agoThanks. Wish it was simpler. It seems overkill to have to an extra proxy in the middle with no auth to authenticate with the one with auth, just to make headless chrome working.
- timstapl 9y agoThere's also page.authenticate, which has worked well for me. https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageauthenticatecredentials https://github.com/GoogleChrome/puppeteer/blob/master/docs/a...
- jancurn 9y agoYou can also use page.authenticate() for that - see a note at the bottom of the article. Also see https://github.com/GoogleChrome/puppeteer/pull/1732 https://github.com/GoogleChrome/puppeteer/pull/1732
- radioo75555 9y agoI think I've done that before. Yeah you just call page.authenticate(user,pass).
- walterstucco 9y agoI created a tiny docker image to solve this issue It's around 200k and very easy to configure https://hub.docker.com/r/massimo/cntlm/ https://hub.docker.com/r/massimo/cntlm/
- transreal 9y agoActually, we just figured out how to do this. Details here: https://bugs.chromium.org/p/chromium/issues/detail?id=741872#c36 https://bugs.chromium.org/p/chromium/issues/detail?id=741872...
- hartator 9y agoAwesome. I need to figure out a way to make it work with our Ruby code, but it shouldn't be that hard. Thanks.