puppeteer-extra-plugin-stealth
Advanced tools
Comparing version 2.4.6 to 2.4.7
@@ -19,9 +19,10 @@ 'use strict' | ||
async onPageCreated(page) { | ||
// Chrome returns undefined, Firefox false | ||
await page.evaluateOnNewDocument(() => { | ||
// eslint-disable-next-line | ||
const newProto = navigator.__proto__ | ||
delete newProto.webdriver | ||
// eslint-disable-next-line | ||
navigator.__proto__ = newProto | ||
Object.defineProperty(window, 'navigator', { | ||
value: new Proxy(navigator, { | ||
has: (target, key) => (key === 'webdriver' ? false : key in target), | ||
get: (target, key, receiver) => | ||
key === 'webdriver' ? undefined : target[key] | ||
}) | ||
}) | ||
}) | ||
@@ -28,0 +29,0 @@ } |
@@ -83,3 +83,2 @@ 'use strict' | ||
const availableEvasions = new Set([ | ||
// 'accept-language', // Temp disabled: see issue #91 | ||
'chrome.runtime', | ||
@@ -91,7 +90,7 @@ 'console.debug', | ||
'navigator.permissions', | ||
'navigator.plugins', | ||
'navigator.webdriver', | ||
'navigator.plugins', | ||
'window.outerdimensions', | ||
'user-agent-override', | ||
'webgl.vendor', | ||
'user-agent' | ||
'window.outerdimensions' | ||
]) | ||
@@ -98,0 +97,0 @@ return { |
{ | ||
"name": "puppeteer-extra-plugin-stealth", | ||
"version": "2.4.6", | ||
"version": "2.4.7", | ||
"description": "Stealth mode: Applies various techniques to make detection of headless puppeteer harder.", | ||
@@ -49,6 +49,6 @@ "main": "index.js", | ||
"debug": "^4.1.1", | ||
"puppeteer-extra-plugin": "^3.1.3", | ||
"puppeteer-extra-plugin-anonymize-ua": "^2.2.7" | ||
"puppeteer-extra-plugin": "^3.1.4", | ||
"puppeteer-extra-plugin-anonymize-ua": "^2.2.8" | ||
}, | ||
"gitHead": "6a89e1196bdf8327ee9a2ba8b18f861d9fc209d3" | ||
"gitHead": "3143ea17daa8d4364835fa7e5f4890f1ee838648" | ||
} |
@@ -76,3 +76,3 @@ # puppeteer-extra-plugin-stealth [](https://travis-ci.org/berstend/puppeteer-extra) [](https://www.npmjs.com/package/puppeteer-extra-plugin-stealth) | ||
_December 2019_ | ||
_January 2020_ | ||
@@ -89,2 +89,9 @@ - ✅ **`puppeeteer-extra` with stealth passes all public bot tests.** | ||
#### `v2.4.7` | ||
- New: `user-agent-override` - Used to set a stealthy UA string, language & platform. This also fixes issues with the prior method of setting the `Accept-Language` header through request interception ([#104](https://github.com/berstend/puppeteer-extra/pull/104), kudos to [@Niek](https://github.com/Niek)) | ||
- New: `navigator.vendor` - Makes it possible to optionally override navigator.vendor ([#110](https://github.com/berstend/puppeteer-extra/pull/110), thanks [@Niek](https://github.com/Niek)) | ||
- Improved: `navigator.webdriver`: Now uses ES6 Proxies to pass `instanceof` tests ([#117](https://github.com/berstend/puppeteer-extra/pull/117), thanks [@aabbccsmith](https://github.com/aabbccsmith)) | ||
- Removed: `user-agent`, `accept-language` (now obsolete) | ||
#### `v2.4.2` / `v2.4.1` | ||
@@ -91,0 +98,0 @@ |
573403
2125
313