puppeteer-extra icon indicating copy to clipboard operation
puppeteer-extra copied to clipboard

[Feature] give headless more stealth

Open reinforcers opened this issue 2 years ago • 5 comments

from my experience turn out headless can be detected through navigator.connection.rtt at Chrome which will always 0, or at Firefox navigator.webdriver will always true, on headless: true. perhaps there are way to set some value on navigator.connection.rtt or set false on navigator.webdriver would be great.

also I'm tested some website could detect the browser itself. when I use executablePath: executablePath() even if headless: false it doesn't work at all. but when I use the Chrome that I install to my system, for example executablePath: '/usr/bin/google-chrome-stable' which using Ubuntu 22.04, it working perfectly, I don't know how they check it though.

reinforcers avatar Feb 23 '23 03:02 reinforcers

What happens when you set headless: 'new' and use the latest Chrome headless browser? They claim it has a closer fingerprint to the flagship non-headless Chrome.

markcellus avatar Feb 24 '23 00:02 markcellus

What happens when you set headless: 'new' and use the latest Chrome headless browser? They claim it has a closer fingerprint to the flagship non-headless Chrome.

it works. tks :smile: :+1: though navigator.connection.rtt value still 0 but it work exactly like headless: true, the executablePath: executablePath() also pass the check on Chrome at the web I needed

EDIT: it looks like I was quick to judge, it works once then it wont work again after retry :smile:

reinforcers avatar Feb 24 '23 03:02 reinforcers

Ah ok. Looking forward to this possibly being addressed. Thanks for filing this one!

I wonder if just manipulating the navigator directly in a page.evaluate works. 🤔 I would try but not near my computer.

markcellus avatar Feb 24 '23 18:02 markcellus

Is there any way to set navigator.connection.rtt to some non zero value?

I'm being detected!

abhisheksurve45 avatar Apr 05 '23 16:04 abhisheksurve45

from my experience headless: 'new' combine with executablePath: executablePath() not working. but if using Chrome installed directly for example ini Ubuntu executablePath: '/usr/bin/google-chrome-stable' some version Chrome it works but newer version doesn't

reinforcers avatar Apr 06 '23 06:04 reinforcers