2026-05-16 17:09:52 -07:00
# invisible_playwright
[](https://github.com/feder-cr/invisible_playwright/actions/workflows/tests.yml)
[](LICENSE)
[](https://www.python.org/downloads/)
[](https://www.mozilla.org/firefox/)
[](https://github.com/feder-cr/invisible_playwright/releases)
[](https://github.com/feder-cr/invisible_playwright/stargazers)
2026-05-23 17:07:19 -07:00
[](https://github.com/feder-cr/invisible_firefox/releases/tag/usage-counter)
2026-05-16 17:09:52 -07:00
2026-05-16 17:16:14 -07:00
[](https://it.linkedin.com/in/federico-elia-5199951b6)
2026-05-25 22:57:29 -07:00
**Stealth Firefox that passes every bot detection test. Drop-in Playwright replacement, fingerprint patched at the C++ level, not a JavaScript shim.**
docs(README): tighten positioning + benchmark vs camoufox and CloakBrowser
Three changes aimed at making the project's value legible in 5 seconds
for someone landing from a Trending list or HN thread:
- New tagline + quantified bullet hook at top. Concrete numbers
(0.90 reCAPTCHA, 0 CreepJS lies, 5/5 detection suites passed) up
front instead of generic "passes the hardest detectors" wording.
- Comparison table rewritten. The commercial-stack columns (Multilogin,
GoLogin, AdsPower, Dolphin Anty, Kameleo) were noise for the OSS
audience we want to reach. Replaced with the two relevant
source-level peers: Camoufox (Firefox, currently in a long
maintenance gap) and CloakBrowser (Chromium, fresh, but capped at
the Chromium reCAPTCHA ceiling).
- "Why it's powerful" opens with explicit positioning vs the two
peers, plus the reCAPTCHA v3 score that's the most defensible
numeric claim.
No code change. Repo homepage URL set separately via API to deep-link
the "Why it's powerful" section so visitors from external links land
on the value pitch rather than the badges row.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 08:26:12 -07:00
2026-05-25 22:57:29 -07:00

2026-05-25 09:28:18 -07:00
2026-05-16 17:09:52 -07:00
2026-06-25 04:23:59 +02:00
## How it works
2026-05-16 17:09:52 -07:00
docs(README): tighten positioning + benchmark vs camoufox and CloakBrowser
Three changes aimed at making the project's value legible in 5 seconds
for someone landing from a Trending list or HN thread:
- New tagline + quantified bullet hook at top. Concrete numbers
(0.90 reCAPTCHA, 0 CreepJS lies, 5/5 detection suites passed) up
front instead of generic "passes the hardest detectors" wording.
- Comparison table rewritten. The commercial-stack columns (Multilogin,
GoLogin, AdsPower, Dolphin Anty, Kameleo) were noise for the OSS
audience we want to reach. Replaced with the two relevant
source-level peers: Camoufox (Firefox, currently in a long
maintenance gap) and CloakBrowser (Chromium, fresh, but capped at
the Chromium reCAPTCHA ceiling).
- "Why it's powerful" opens with explicit positioning vs the two
peers, plus the reCAPTCHA v3 score that's the most defensible
numeric claim.
No code change. Repo homepage URL set separately via API to deep-link
the "Why it's powerful" section so visitors from external links land
on the value pitch rather than the badges row.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 08:26:12 -07:00
**Most other anti-detect browsers patch Chromium at the JavaScript level** - they override `navigator` , `WebGLRenderingContext.getParameter` , canvas APIs, and so on via injected scripts. This has two fatal problems:
2026-05-16 17:09:52 -07:00
1. **JS patches are detectable.** Anti-bots enumerate native function `.toString()` , check descriptor configurability, compare property enumeration order, watch for prototype mutations. Every patch leaves a fingerprint of its own. CreepJS has an entire battery of "lies detectors" built around this.
2026-06-25 04:26:40 +02:00
2. **Chromium itself is now suspect.** Forks can’ t fully match Chrome: it ships closed-source components (Widevine, proprietary codecs, Safe Browsing) that flip detectable JS flags and network signals, and forks lag Chrome’ s release cadence, leaving version-specific tells detectors lock onto.
2026-05-16 17:09:52 -07:00
2026-06-25 04:32:32 +02:00
**invisible_playwright patches Firefox at the C++ level.** The spoofed values come back through normal Gecko paths - no JS shim, no override, no `Object.defineProperty` . From the page's point of view, the browser is just telling the truth. It spoofs all the layers that matter: Navigator, screen, GPU/WebGL, Canvas, fonts, audio, WebRTC, timezone, DevTools, SOCKS5. See [feder-cr/invisible_firefox ](https://github.com/feder-cr/invisible_firefox ) for the full per-layer breakdown.
2026-05-16 17:09:52 -07:00
---
## How it compares
2026-06-25 04:31:47 +02:00
**CloakBrowser** is closed source (patches not published) and hits the Chromium reCAPTCHA ceiling. **Multilogin** , **GoLogin** , AdsPower, Dolphin, Kameleo are paid SaaS running JS-layer spoofing on a patched Chromium.
2026-06-06 15:24:23 +02:00
| | invisible_playwright | Camoufox | CloakBrowser | Multilogin |
|---|---|---|---|---|
| Engine | Firefox 150 | Firefox (~1 year old base) | Chromium | Chromium fork |
2026-06-08 06:16:49 +02:00
| Patch depth | C++ source | C++ source | C++ source | JS overrides |
| Maintenance | Active | Gap (~1 year) | Active | Active SaaS |
2026-06-06 15:24:23 +02:00
| Open source | ✅ MIT | ✅ MPL | ❌ Closed source | ❌ Closed source |
| `.toString()` clean | ✅ | ✅ | ✅ | ❌ Detectable shims |
| Canvas / WebGL / Audio | ✅ C++ | ⚠️ Drift vs current FF | ✅ C++ | ⚠️ JS override |
| SOCKS5 auth | ✅ Patched | ❌ | ⚠️ Playwright proxy | ⚠️ Varies |
| **reCAPTCHA v3 score** | **0.90** | ~0.3-0.5 | ~0.3-0.5 | ~0.3-0.6 |
| FP Pro - bot detected | ✅ Not detected | ❌ Detected | ❌ Detected | ❌ Detected |
| CreepJS lies | ✅ 0 | ❌ Multiple | ✅ 0 | ❌ Multiple |
| Cost | Free | Free | Free | From $99/mo |
2026-05-25 09:28:18 -07:00
2026-05-16 17:09:52 -07:00
---
## Install
```bash
pip install git+https://github.com/feder-cr/invisible_playwright.git
python -m invisible_playwright fetch # one-time ~100 MB download, SHA256-verified
```
2026-06-10 11:10:49 +02:00
Supported platforms: **Windows x86_64** , **Linux x86_64 / arm64** , **macOS arm64 / x86_64** . On macOS the app is ad-hoc signed (not notarized): if Gatekeeper complains, clear the quarantine flag once with `xattr -dr com.apple.quarantine` on the cached `Firefox.app` .
2026-05-16 17:09:52 -07:00
---
## Usage
### Random fingerprint per session
**100% Playwright-compatible** - sync and async, all methods, zero API changes. If you already use Playwright, switching is two lines:
```diff
- from playwright.sync_api import sync_playwright
- with sync_playwright() as p:
- browser = p.firefox.launch()
+ from invisible_playwright import InvisiblePlaywright
+ with InvisiblePlaywright() as browser:
```
2026-06-25 04:31:47 +02:00
Every session gets a distinct fingerprint (GPU, audio, fonts, screen, ~400 fields) and Bezier-curve mouse motion.
2026-05-16 17:09:52 -07:00
**Sync**
```python
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(proxy={"server": "socks5://...", "username": "u", "password": "p"}) as browser:
page = browser.new_page()
page.goto("https://example.com")
page.click("#submit ") # mouse arcs to the button on a Bezier curve
```
**Async**
```python
from invisible_playwright.async_api import InvisiblePlaywright
async with InvisiblePlaywright(proxy={"server": "socks5://...", "username": "u", "password": "p"}) as browser:
page = await browser.new_page()
await page.goto("https://example.com")
await page.click("#submit ")
```
The `browser` object is a `playwright.sync_api.Browser` / `playwright.async_api.Browser` - every Playwright method works as-is.
2026-06-25 04:31:47 +02:00
Log the seed to replay a run:
2026-05-16 17:09:52 -07:00
```python
sf = InvisiblePlaywright()
with sf as browser:
print("seed =", sf.seed)
# ...
```
### Reproducible fingerprint
```python
with InvisiblePlaywright(seed=42) as browser:
... # same GPU, same canvas hash, same audio context, every run
```
### Proxies
```python
proxy = {
"server": "socks5://gate.example.com:1080",
"username": "user",
"password": "pass",
}
with InvisiblePlaywright(proxy=proxy) as browser:
...
```
2026-06-25 04:28:44 +02:00
Schemes supported: `socks5` , `socks4` , `http` , `https` . DNS is routed through the proxy by default, no local leak.
2026-05-16 17:09:52 -07:00
2026-06-06 04:16:22 +02:00
### Timezone
The browser timezone follows `timezone=` :
```python
2026-06-06 05:16:20 +02:00
# default: timezone is auto-derived from the egress IP (proxy egress if a
# proxy is set, otherwise the host's own public IP)
2026-06-06 04:16:22 +02:00
with InvisiblePlaywright(proxy=proxy) as browser:
...
2026-06-25 04:32:32 +02:00
# explicit IANA zone always wins, the only way to force a specific zone
2026-06-06 04:16:22 +02:00
with InvisiblePlaywright(proxy=proxy, timezone="America/New_York") as browser:
...
```
2026-05-16 17:09:52 -07:00
### Pinning specific fingerprint fields
By default everything comes from `seed` . To force specific values while the rest stays seed-derived:
```python
with InvisiblePlaywright(
seed=42,
pin={
"gpu.renderer": "ANGLE (NVIDIA, NVIDIA GeForce RTX 4090 Direct3D11)",
"gpu.vendor": "Google Inc. (NVIDIA)",
"screen.width": 2560,
"screen.height": 1440,
"hardware.concurrency": 16,
},
) as browser:
...
```
Full list of pinnable keys, how pinning interacts with the Bayesian sampler, and common patterns are in ** [docs/pinning.md ](docs/pinning.md )**.
---
## CLI
```bash
invisible_playwright fetch # download the binary if missing
2026-06-10 11:10:49 +02:00
invisible_playwright fetch --force # re-download even if cached
2026-05-16 17:09:52 -07:00
invisible_playwright path # print the absolute path to the cached binary
invisible_playwright version # wrapper and binary versions
invisible_playwright clear-cache # remove all cached binaries
```
## Related projects
2026-06-25 04:23:59 +02:00
Related projects that cover similar ground:
2026-05-16 17:09:52 -07:00
2026-06-25 04:31:47 +02:00
- **[arkenfox/user.js ](https://github.com/arkenfox/user.js )** - Firefox privacy hardening via prefs. invisible_playwright patches C++ where prefs are insufficient.
- **[LibreWolf ](https://librewolf.net )** - Firefox fork with privacy defaults. LibreWolf ships a configured binary; invisible_playwright ships source patches + automation wrapper.
- **[Camoufox ](https://github.com/daijro/camoufox )** - open-source anti-detect Firefox. Patches a wider surface and ships its own fingerprint database; invisible_playwright uses a Bayesian sampler.
2026-05-16 17:09:52 -07:00
---
## License
2026-05-23 11:09:27 -07:00
MIT - see [LICENSE ](LICENSE ). The patched Firefox binary is distributed under the MPL-2.0 (Firefox upstream license). The C++ patches against mozilla-central that produce that binary are at [feder-cr/invisible_firefox ](https://github.com/feder-cr/invisible_firefox ).
2026-06-25 04:25:03 +02:00
---
## Disclaimer
This project is for educational purposes only. It is provided as-is, with no warranties. I take no responsibility for how it is used. Use it at your own risk and in compliance with the laws of your jurisdiction.