playwright-afp
Stop websites fingerprinting your puppeteer browser instances.
This covers:
Canvas Fingerprinting, WebGL Fingerprinting, AudioContext Fingerprinting, Font Fingerprinting
Installation
yarn add playwright-afp
npm install playwright-afp
Usage
const { chromium } = require('playwright');
const protectIt = require('playwright-afp');
const browser = await chromium.launch();
const browserContext = await browser.newContext();
const options = {
canvasRgba: [0, 0, 0, 0],
webglData: {
3379: 32768,
3386: {
0: 32768,
1: 32768,
},
3410: 2,
3411: 2,
3412: 16,
3413: 2,
7938: "WebGL 1.0 (OpenGL Chromium)",
33901: {
0: 1,
1: 1,
},
33902: {
0: 1,
1: 4096,
},
34024: 32768,
34047: 8,
34076: 16384,
34921: 16,
34930: 16,
35660: 2,
35661: 32,
35724: "WebGL GLSL ES",
36347: 4096,
36349: 8192,
37446: "HD Graphics",
},
fontFingerprint: {
noise: 1,
sign: +1,
},
audioFingerprint: {
getChannelDataIndexRandom: 0.7659530895341677,
getChannelDataResultRandom: 0.7659530895341677,
createAnalyserIndexRandom: 0.7659530895341677,
createAnalyserResultRandom: 0.7659530895341677,
},
webRTCProtect: true
};
const page = browser.newPage()
await protectIt(page, options)
await protectIt(browserContext, options)
Go to https://webbrowsertools.com with your browser and check your fingerprints
Creator
Pavle Aleksic
License
This project is licensed under the terms of the MIT license.