cloakbrowser 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cloakbrowser-0.1.0/.gitignore +42 -0
- cloakbrowser-0.1.0/Dockerfile +21 -0
- cloakbrowser-0.1.0/LICENSE +21 -0
- cloakbrowser-0.1.0/PKG-INFO +267 -0
- cloakbrowser-0.1.0/README.md +238 -0
- cloakbrowser-0.1.0/cloakbrowser/__init__.py +29 -0
- cloakbrowser-0.1.0/cloakbrowser/_version.py +1 -0
- cloakbrowser-0.1.0/cloakbrowser/browser.py +222 -0
- cloakbrowser-0.1.0/cloakbrowser/config.py +111 -0
- cloakbrowser-0.1.0/cloakbrowser/download.py +211 -0
- cloakbrowser-0.1.0/examples/basic.py +13 -0
- cloakbrowser-0.1.0/examples/recaptcha_score.py +32 -0
- cloakbrowser-0.1.0/examples/stealth_test.py +57 -0
- cloakbrowser-0.1.0/images/browserscan_normal.png +0 -0
- cloakbrowser-0.1.0/images/fingerprintjs_pass.png +0 -0
- cloakbrowser-0.1.0/images/google_search_cdp_pass.png +0 -0
- cloakbrowser-0.1.0/images/turnstile_non_interactive.png +0 -0
- cloakbrowser-0.1.0/pyproject.toml +61 -0
- cloakbrowser-0.1.0/tests/__init__.py +0 -0
- cloakbrowser-0.1.0/tests/test_launch.py +81 -0
- cloakbrowser-0.1.0/tests/test_stealth.py +108 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg-info/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
*.egg
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environment
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# IDE
|
|
18
|
+
.vscode/
|
|
19
|
+
.idea/
|
|
20
|
+
*.swp
|
|
21
|
+
*.swo
|
|
22
|
+
*~
|
|
23
|
+
|
|
24
|
+
# OS
|
|
25
|
+
.DS_Store
|
|
26
|
+
Thumbs.db
|
|
27
|
+
|
|
28
|
+
# Testing
|
|
29
|
+
.pytest_cache/
|
|
30
|
+
.coverage
|
|
31
|
+
htmlcov/
|
|
32
|
+
|
|
33
|
+
# Binary cache (downloaded chromium)
|
|
34
|
+
.cloakbrowser/
|
|
35
|
+
|
|
36
|
+
# Claude Code (private project context)
|
|
37
|
+
CLAUDE.md
|
|
38
|
+
.claude/
|
|
39
|
+
|
|
40
|
+
# Distribution
|
|
41
|
+
*.tar.gz
|
|
42
|
+
*.whl
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
FROM python:3.12-slim
|
|
2
|
+
|
|
3
|
+
# Playwright system deps
|
|
4
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
5
|
+
libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
|
|
6
|
+
libdbus-1-3 libdrm2 libxkbcommon0 libatspi2.0-0 libxcomposite1 \
|
|
7
|
+
libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 \
|
|
8
|
+
libcairo2 libasound2 libx11-xcb1 \
|
|
9
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
10
|
+
|
|
11
|
+
WORKDIR /app
|
|
12
|
+
|
|
13
|
+
COPY pyproject.toml README.md LICENSE ./
|
|
14
|
+
COPY cloakbrowser/ cloakbrowser/
|
|
15
|
+
|
|
16
|
+
RUN pip install --no-cache-dir .
|
|
17
|
+
|
|
18
|
+
# Pre-download stealth Chromium binary during build (not at runtime)
|
|
19
|
+
RUN python -c "from cloakbrowser import ensure_binary; ensure_binary()"
|
|
20
|
+
|
|
21
|
+
CMD ["python"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 cloakbrowser
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cloakbrowser
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Stealth Chromium that passes every bot detection test. Drop-in Playwright replacement with source-level fingerprint patches.
|
|
5
|
+
Project-URL: Homepage, https://github.com/CloakHQ/cloakbrowser
|
|
6
|
+
Project-URL: Documentation, https://github.com/CloakHQ/cloakbrowser#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/CloakHQ/cloakbrowser
|
|
8
|
+
Project-URL: Issues, https://github.com/CloakHQ/cloakbrowser/issues
|
|
9
|
+
Author: cloakbrowser
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: anti-detect,automation,bot-detection,browser,chromium,cloudflare,fingerprint,playwright,recaptcha,scraping,stealth,turnstile,web-scraping
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Classifier: Topic :: Software Development :: Testing
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
|
+
Requires-Dist: httpx>=0.24
|
|
27
|
+
Requires-Dist: playwright>=1.40
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# CloakBrowser
|
|
31
|
+
|
|
32
|
+
**Stealth Chromium that passes every bot detection test.**
|
|
33
|
+
|
|
34
|
+
Drop-in Playwright replacement. Same API, same code — just swap the import. Your browser now scores **0.9 on reCAPTCHA v3**, passes **Cloudflare Turnstile**, and clears **14 out of 14** stealth detection tests.
|
|
35
|
+
|
|
36
|
+
> CloakBrowser is an open-source Python library that gives you an undetectable browser for web automation and data collection. It wraps a custom-built Chromium binary with 16 source-level fingerprint patches — modifications compiled directly into the browser's C++ code, not bolted on via JavaScript injection or config flags.
|
|
37
|
+
>
|
|
38
|
+
> Most stealth tools (playwright-stealth, undetected-chromedriver, puppeteer-extra) work at the config level: they override JavaScript properties, set browser flags, or inject scripts to mask automation signals. These approaches break every time Chrome updates its detection surface — and Cloudflare, reCAPTCHA, and other bot detection systems update constantly.
|
|
39
|
+
>
|
|
40
|
+
> CloakBrowser takes a fundamentally different approach. The fingerprint patches modify Chromium's rendering pipeline at the source level: canvas output, WebGL renderer strings, audio processing fingerprints, font enumeration, hardware concurrency, client rectangles, GPU info, timezone handling, and the WebDriver flag are all patched in C++ before compilation. The resulting binary produces fingerprints indistinguishable from a real user's Chrome installation. TLS fingerprints (ja3n, ja4, akamai hash) match genuine Chrome exactly because the browser IS Chrome — just with different fingerprint values compiled in.
|
|
41
|
+
>
|
|
42
|
+
> The result: a 0.9 score on Google's reCAPTCHA v3 (human-level, versus 0.1 for stock Playwright), clean passes on Cloudflare Turnstile managed challenges, zero bot flags on FingerprintJS, BrowserScan, and deviceandbrowserinfo.com, and undetected CDP (Chrome DevTools Protocol) usage. 14 out of 14 major detection tests passed.
|
|
43
|
+
>
|
|
44
|
+
> CloakBrowser fills the vacuum left by Camoufox (the popular Firefox-based stealth browser whose maintainer stepped down in 2025). Unlike Camoufox, CloakBrowser is Chromium-based — meaning native Playwright API support, a massive ecosystem of existing tools and scripts, and TLS fingerprints that match the browser 65%+ of the internet actually uses.
|
|
45
|
+
>
|
|
46
|
+
> Install with pip, write standard Playwright code, and let the binary handle the stealth. No new API to learn. No configuration to tune. No CAPTCHA-solving services to pay for. Just a browser that works on sites where others get blocked.
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from cloakbrowser import launch
|
|
50
|
+
|
|
51
|
+
browser = launch()
|
|
52
|
+
page = browser.new_page()
|
|
53
|
+
page.goto("https://protected-site.com") # no more blocks
|
|
54
|
+
browser.close()
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pip install cloakbrowser
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
On first run, the stealth Chromium binary is automatically downloaded (~200MB, cached locally).
|
|
64
|
+
|
|
65
|
+
## Why CloakBrowser?
|
|
66
|
+
|
|
67
|
+
Every bot detection system — reCAPTCHA, Cloudflare Turnstile, ShieldSquare, FingerprintJS — identifies automation browsers through **browser fingerprinting**: canvas rendering, WebGL output, audio processing, font enumeration, and dozens of other signals.
|
|
68
|
+
|
|
69
|
+
Tools like `playwright-stealth` or `undetected-chromedriver` try to fix this with **config-level patches** — JavaScript overrides, flag tweaks, UA spoofing. These work until the next Chrome update breaks them.
|
|
70
|
+
|
|
71
|
+
CloakBrowser patches **Chromium source code** — the fingerprint signals are modified at the C++ level, compiled into the binary. Detection sites see a real browser because, at the binary level, it *is* a real browser with different fingerprint values.
|
|
72
|
+
|
|
73
|
+
## Test Results
|
|
74
|
+
|
|
75
|
+
All tests verified against live detection services. Last tested: Feb 2026 (Chromium 145).
|
|
76
|
+
|
|
77
|
+
| Detection Service | Stock Playwright | CloakBrowser | Notes |
|
|
78
|
+
|---|---|---|---|
|
|
79
|
+
| **reCAPTCHA v3** | 0.1 (bot) | **0.9** (human) | Server-side verified |
|
|
80
|
+
| **Cloudflare Turnstile** (non-interactive) | FAIL | **PASS** | Auto-resolve |
|
|
81
|
+
| **Cloudflare Turnstile** (managed) | FAIL | **PASS** | Single click |
|
|
82
|
+
| **ShieldSquare** (yad2.co.il) | BLOCKED | **PASS** | Production site |
|
|
83
|
+
| **FingerprintJS** bot detection | DETECTED | **PASS** | demo.fingerprint.com |
|
|
84
|
+
| **BrowserScan** bot detection | DETECTED | **NORMAL** (4/4) | browserscan.net |
|
|
85
|
+
| **bot.incolumitas.com** | 13 fails | **1 fail** | WEBDRIVER spec only |
|
|
86
|
+
| **deviceandbrowserinfo.com** | 6 true flags | **0 true flags** | `isBot: false` |
|
|
87
|
+
| `navigator.webdriver` | `true` | **`false`** | Source-level patch |
|
|
88
|
+
| `navigator.plugins.length` | 0 | **5** | Real plugin list |
|
|
89
|
+
| `window.chrome` | `undefined` | **`object`** | Present like real Chrome |
|
|
90
|
+
| UA string | `HeadlessChrome` | **`Chrome/145.0.0.0`** | No headless leak |
|
|
91
|
+
| CDP detection | Detected | **Not detected** | `isAutomatedWithCDP: false` |
|
|
92
|
+
| TLS fingerprint | Mismatch | **Identical to Chrome** | ja3n/ja4/akamai match |
|
|
93
|
+
|
|
94
|
+
**14/14 tests passed.**
|
|
95
|
+
|
|
96
|
+
## How It Works
|
|
97
|
+
|
|
98
|
+
CloakBrowser is a thin Python wrapper around a custom-built Chromium binary:
|
|
99
|
+
|
|
100
|
+
1. **You install** → `pip install cloakbrowser`
|
|
101
|
+
2. **First launch** → binary auto-downloads for your platform (Linux x64 / macOS arm64)
|
|
102
|
+
3. **Every launch** → Playwright starts with our binary + stealth args
|
|
103
|
+
4. **You write code** → standard Playwright API, nothing new to learn
|
|
104
|
+
|
|
105
|
+
The binary includes 16 source-level patches that modify:
|
|
106
|
+
- Canvas fingerprint generation
|
|
107
|
+
- WebGL renderer output
|
|
108
|
+
- Audio processing fingerprint
|
|
109
|
+
- Font enumeration results
|
|
110
|
+
- Hardware concurrency reporting
|
|
111
|
+
- Client rect measurements
|
|
112
|
+
- GPU vendor/renderer strings
|
|
113
|
+
- WebDriver flag
|
|
114
|
+
- Headless detection signals
|
|
115
|
+
- And more...
|
|
116
|
+
|
|
117
|
+
These are compiled into the Chromium binary — not injected via JavaScript, not set via flags.
|
|
118
|
+
|
|
119
|
+
## API
|
|
120
|
+
|
|
121
|
+
### `launch()`
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
from cloakbrowser import launch
|
|
125
|
+
|
|
126
|
+
# Basic — headless, default stealth config
|
|
127
|
+
browser = launch()
|
|
128
|
+
|
|
129
|
+
# Headed mode (see the browser window)
|
|
130
|
+
browser = launch(headless=False)
|
|
131
|
+
|
|
132
|
+
# With proxy
|
|
133
|
+
browser = launch(proxy="http://user:pass@proxy:8080")
|
|
134
|
+
|
|
135
|
+
# With extra Chrome args
|
|
136
|
+
browser = launch(args=["--disable-gpu", "--window-size=1920,1080"])
|
|
137
|
+
|
|
138
|
+
# Without default stealth args (bring your own fingerprint flags)
|
|
139
|
+
browser = launch(stealth_args=False, args=["--fingerprint=12345"])
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Returns a standard Playwright `Browser` object. All Playwright methods work: `new_page()`, `new_context()`, `close()`, etc.
|
|
143
|
+
|
|
144
|
+
### `launch_async()`
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
import asyncio
|
|
148
|
+
from cloakbrowser import launch_async
|
|
149
|
+
|
|
150
|
+
async def main():
|
|
151
|
+
browser = await launch_async()
|
|
152
|
+
page = await browser.new_page()
|
|
153
|
+
await page.goto("https://example.com")
|
|
154
|
+
print(await page.title())
|
|
155
|
+
await browser.close()
|
|
156
|
+
|
|
157
|
+
asyncio.run(main())
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### `launch_context()`
|
|
161
|
+
|
|
162
|
+
Convenience function that creates browser + context with common options:
|
|
163
|
+
|
|
164
|
+
```python
|
|
165
|
+
from cloakbrowser import launch_context
|
|
166
|
+
|
|
167
|
+
context = launch_context(
|
|
168
|
+
user_agent="Custom UA",
|
|
169
|
+
viewport={"width": 1920, "height": 1080},
|
|
170
|
+
locale="en-US",
|
|
171
|
+
timezone_id="America/New_York",
|
|
172
|
+
)
|
|
173
|
+
page = context.new_page()
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Utility Functions
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
from cloakbrowser import binary_info, clear_cache, ensure_binary
|
|
180
|
+
|
|
181
|
+
# Check binary installation status
|
|
182
|
+
print(binary_info())
|
|
183
|
+
# {'version': '145.0.7723.116', 'platform': 'darwin-arm64', 'installed': True, ...}
|
|
184
|
+
|
|
185
|
+
# Force re-download
|
|
186
|
+
clear_cache()
|
|
187
|
+
|
|
188
|
+
# Pre-download binary (e.g., during Docker build)
|
|
189
|
+
ensure_binary()
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Configuration
|
|
193
|
+
|
|
194
|
+
| Env Variable | Default | Description |
|
|
195
|
+
|---|---|---|
|
|
196
|
+
| `CLOAKBROWSER_BINARY_PATH` | — | Skip download, use a local Chromium binary |
|
|
197
|
+
| `CLOAKBROWSER_CACHE_DIR` | `~/.cloakbrowser` | Binary cache directory |
|
|
198
|
+
| `CLOAKBROWSER_DOWNLOAD_URL` | GitHub Releases | Custom download URL for binary |
|
|
199
|
+
|
|
200
|
+
## Use With Existing Playwright Code
|
|
201
|
+
|
|
202
|
+
If you have existing Playwright scripts, migration is one line:
|
|
203
|
+
|
|
204
|
+
```diff
|
|
205
|
+
- from playwright.sync_api import sync_playwright
|
|
206
|
+
- pw = sync_playwright().start()
|
|
207
|
+
- browser = pw.chromium.launch()
|
|
208
|
+
+ from cloakbrowser import launch
|
|
209
|
+
+ browser = launch()
|
|
210
|
+
|
|
211
|
+
page = browser.new_page()
|
|
212
|
+
page.goto("https://example.com")
|
|
213
|
+
# ... rest of your code works unchanged
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Comparison
|
|
217
|
+
|
|
218
|
+
| Feature | Playwright | playwright-stealth | undetected-chromedriver | Camoufox | CloakBrowser |
|
|
219
|
+
|---|---|---|---|---|---|
|
|
220
|
+
| reCAPTCHA v3 score | 0.1 | 0.3-0.5 | 0.3-0.7 | 0.7-0.9 | **0.9** |
|
|
221
|
+
| Cloudflare Turnstile | Fail | Sometimes | Sometimes | Pass | **Pass** |
|
|
222
|
+
| Patch level | None | JS injection | Config patches | C++ (Firefox) | **C++ (Chromium)** |
|
|
223
|
+
| Survives Chrome updates | N/A | Breaks often | Breaks often | Yes | **Yes** |
|
|
224
|
+
| Maintained | Yes | Stale | Stale | Dead (2025) | **Active** |
|
|
225
|
+
| Browser engine | Chromium | Chromium | Chrome | Firefox | **Chromium** |
|
|
226
|
+
| Playwright API | Native | Native | No (Selenium) | No | **Native** |
|
|
227
|
+
|
|
228
|
+
## Platforms
|
|
229
|
+
|
|
230
|
+
| Platform | Status |
|
|
231
|
+
|---|---|
|
|
232
|
+
| Linux x86_64 | Supported |
|
|
233
|
+
| macOS arm64 (Apple Silicon) | Coming soon |
|
|
234
|
+
| macOS x86_64 (Intel) | Coming soon |
|
|
235
|
+
| Windows | Planned |
|
|
236
|
+
|
|
237
|
+
## Examples
|
|
238
|
+
|
|
239
|
+
See the [`examples/`](examples/) directory:
|
|
240
|
+
- [`basic.py`](examples/basic.py) — Launch and load a page
|
|
241
|
+
- [`recaptcha_score.py`](examples/recaptcha_score.py) — Check your reCAPTCHA v3 score
|
|
242
|
+
- [`stealth_test.py`](examples/stealth_test.py) — Run against all detection services
|
|
243
|
+
|
|
244
|
+
## FAQ
|
|
245
|
+
|
|
246
|
+
**Q: Is this legal?**
|
|
247
|
+
A: CloakBrowser is a browser. Using it is legal. What you do with it is your responsibility, just like with Chrome, Firefox, or any browser. We do not endorse violating website terms of service.
|
|
248
|
+
|
|
249
|
+
**Q: How is this different from Camoufox?**
|
|
250
|
+
A: Camoufox patched Firefox. We patch Chromium. Chromium means native Playwright support, larger ecosystem, and TLS fingerprints that match real Chrome. Also, Camoufox is no longer maintained (since March 2025).
|
|
251
|
+
|
|
252
|
+
**Q: Will detection sites eventually catch this?**
|
|
253
|
+
A: Possibly. Bot detection is an arms race. Source-level patches are harder to detect than config-level patches, but not impossible. We actively monitor and update when detection evolves.
|
|
254
|
+
|
|
255
|
+
**Q: Can I use my own proxy?**
|
|
256
|
+
A: Yes. Pass `proxy="http://user:pass@host:port"` to `launch()`.
|
|
257
|
+
|
|
258
|
+
**Q: Can I use this with Docker?**
|
|
259
|
+
A: Yes. Use `ensure_binary()` in your Dockerfile to pre-download the binary during image build.
|
|
260
|
+
|
|
261
|
+
## License
|
|
262
|
+
|
|
263
|
+
MIT — see [LICENSE](LICENSE).
|
|
264
|
+
|
|
265
|
+
## Contributing
|
|
266
|
+
|
|
267
|
+
Issues and PRs welcome. Contact: cloakhq@pm.me
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# CloakBrowser
|
|
2
|
+
|
|
3
|
+
**Stealth Chromium that passes every bot detection test.**
|
|
4
|
+
|
|
5
|
+
Drop-in Playwright replacement. Same API, same code — just swap the import. Your browser now scores **0.9 on reCAPTCHA v3**, passes **Cloudflare Turnstile**, and clears **14 out of 14** stealth detection tests.
|
|
6
|
+
|
|
7
|
+
> CloakBrowser is an open-source Python library that gives you an undetectable browser for web automation and data collection. It wraps a custom-built Chromium binary with 16 source-level fingerprint patches — modifications compiled directly into the browser's C++ code, not bolted on via JavaScript injection or config flags.
|
|
8
|
+
>
|
|
9
|
+
> Most stealth tools (playwright-stealth, undetected-chromedriver, puppeteer-extra) work at the config level: they override JavaScript properties, set browser flags, or inject scripts to mask automation signals. These approaches break every time Chrome updates its detection surface — and Cloudflare, reCAPTCHA, and other bot detection systems update constantly.
|
|
10
|
+
>
|
|
11
|
+
> CloakBrowser takes a fundamentally different approach. The fingerprint patches modify Chromium's rendering pipeline at the source level: canvas output, WebGL renderer strings, audio processing fingerprints, font enumeration, hardware concurrency, client rectangles, GPU info, timezone handling, and the WebDriver flag are all patched in C++ before compilation. The resulting binary produces fingerprints indistinguishable from a real user's Chrome installation. TLS fingerprints (ja3n, ja4, akamai hash) match genuine Chrome exactly because the browser IS Chrome — just with different fingerprint values compiled in.
|
|
12
|
+
>
|
|
13
|
+
> The result: a 0.9 score on Google's reCAPTCHA v3 (human-level, versus 0.1 for stock Playwright), clean passes on Cloudflare Turnstile managed challenges, zero bot flags on FingerprintJS, BrowserScan, and deviceandbrowserinfo.com, and undetected CDP (Chrome DevTools Protocol) usage. 14 out of 14 major detection tests passed.
|
|
14
|
+
>
|
|
15
|
+
> CloakBrowser fills the vacuum left by Camoufox (the popular Firefox-based stealth browser whose maintainer stepped down in 2025). Unlike Camoufox, CloakBrowser is Chromium-based — meaning native Playwright API support, a massive ecosystem of existing tools and scripts, and TLS fingerprints that match the browser 65%+ of the internet actually uses.
|
|
16
|
+
>
|
|
17
|
+
> Install with pip, write standard Playwright code, and let the binary handle the stealth. No new API to learn. No configuration to tune. No CAPTCHA-solving services to pay for. Just a browser that works on sites where others get blocked.
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from cloakbrowser import launch
|
|
21
|
+
|
|
22
|
+
browser = launch()
|
|
23
|
+
page = browser.new_page()
|
|
24
|
+
page.goto("https://protected-site.com") # no more blocks
|
|
25
|
+
browser.close()
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install cloakbrowser
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
On first run, the stealth Chromium binary is automatically downloaded (~200MB, cached locally).
|
|
35
|
+
|
|
36
|
+
## Why CloakBrowser?
|
|
37
|
+
|
|
38
|
+
Every bot detection system — reCAPTCHA, Cloudflare Turnstile, ShieldSquare, FingerprintJS — identifies automation browsers through **browser fingerprinting**: canvas rendering, WebGL output, audio processing, font enumeration, and dozens of other signals.
|
|
39
|
+
|
|
40
|
+
Tools like `playwright-stealth` or `undetected-chromedriver` try to fix this with **config-level patches** — JavaScript overrides, flag tweaks, UA spoofing. These work until the next Chrome update breaks them.
|
|
41
|
+
|
|
42
|
+
CloakBrowser patches **Chromium source code** — the fingerprint signals are modified at the C++ level, compiled into the binary. Detection sites see a real browser because, at the binary level, it *is* a real browser with different fingerprint values.
|
|
43
|
+
|
|
44
|
+
## Test Results
|
|
45
|
+
|
|
46
|
+
All tests verified against live detection services. Last tested: Feb 2026 (Chromium 145).
|
|
47
|
+
|
|
48
|
+
| Detection Service | Stock Playwright | CloakBrowser | Notes |
|
|
49
|
+
|---|---|---|---|
|
|
50
|
+
| **reCAPTCHA v3** | 0.1 (bot) | **0.9** (human) | Server-side verified |
|
|
51
|
+
| **Cloudflare Turnstile** (non-interactive) | FAIL | **PASS** | Auto-resolve |
|
|
52
|
+
| **Cloudflare Turnstile** (managed) | FAIL | **PASS** | Single click |
|
|
53
|
+
| **ShieldSquare** (yad2.co.il) | BLOCKED | **PASS** | Production site |
|
|
54
|
+
| **FingerprintJS** bot detection | DETECTED | **PASS** | demo.fingerprint.com |
|
|
55
|
+
| **BrowserScan** bot detection | DETECTED | **NORMAL** (4/4) | browserscan.net |
|
|
56
|
+
| **bot.incolumitas.com** | 13 fails | **1 fail** | WEBDRIVER spec only |
|
|
57
|
+
| **deviceandbrowserinfo.com** | 6 true flags | **0 true flags** | `isBot: false` |
|
|
58
|
+
| `navigator.webdriver` | `true` | **`false`** | Source-level patch |
|
|
59
|
+
| `navigator.plugins.length` | 0 | **5** | Real plugin list |
|
|
60
|
+
| `window.chrome` | `undefined` | **`object`** | Present like real Chrome |
|
|
61
|
+
| UA string | `HeadlessChrome` | **`Chrome/145.0.0.0`** | No headless leak |
|
|
62
|
+
| CDP detection | Detected | **Not detected** | `isAutomatedWithCDP: false` |
|
|
63
|
+
| TLS fingerprint | Mismatch | **Identical to Chrome** | ja3n/ja4/akamai match |
|
|
64
|
+
|
|
65
|
+
**14/14 tests passed.**
|
|
66
|
+
|
|
67
|
+
## How It Works
|
|
68
|
+
|
|
69
|
+
CloakBrowser is a thin Python wrapper around a custom-built Chromium binary:
|
|
70
|
+
|
|
71
|
+
1. **You install** → `pip install cloakbrowser`
|
|
72
|
+
2. **First launch** → binary auto-downloads for your platform (Linux x64 / macOS arm64)
|
|
73
|
+
3. **Every launch** → Playwright starts with our binary + stealth args
|
|
74
|
+
4. **You write code** → standard Playwright API, nothing new to learn
|
|
75
|
+
|
|
76
|
+
The binary includes 16 source-level patches that modify:
|
|
77
|
+
- Canvas fingerprint generation
|
|
78
|
+
- WebGL renderer output
|
|
79
|
+
- Audio processing fingerprint
|
|
80
|
+
- Font enumeration results
|
|
81
|
+
- Hardware concurrency reporting
|
|
82
|
+
- Client rect measurements
|
|
83
|
+
- GPU vendor/renderer strings
|
|
84
|
+
- WebDriver flag
|
|
85
|
+
- Headless detection signals
|
|
86
|
+
- And more...
|
|
87
|
+
|
|
88
|
+
These are compiled into the Chromium binary — not injected via JavaScript, not set via flags.
|
|
89
|
+
|
|
90
|
+
## API
|
|
91
|
+
|
|
92
|
+
### `launch()`
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
from cloakbrowser import launch
|
|
96
|
+
|
|
97
|
+
# Basic — headless, default stealth config
|
|
98
|
+
browser = launch()
|
|
99
|
+
|
|
100
|
+
# Headed mode (see the browser window)
|
|
101
|
+
browser = launch(headless=False)
|
|
102
|
+
|
|
103
|
+
# With proxy
|
|
104
|
+
browser = launch(proxy="http://user:pass@proxy:8080")
|
|
105
|
+
|
|
106
|
+
# With extra Chrome args
|
|
107
|
+
browser = launch(args=["--disable-gpu", "--window-size=1920,1080"])
|
|
108
|
+
|
|
109
|
+
# Without default stealth args (bring your own fingerprint flags)
|
|
110
|
+
browser = launch(stealth_args=False, args=["--fingerprint=12345"])
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Returns a standard Playwright `Browser` object. All Playwright methods work: `new_page()`, `new_context()`, `close()`, etc.
|
|
114
|
+
|
|
115
|
+
### `launch_async()`
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import asyncio
|
|
119
|
+
from cloakbrowser import launch_async
|
|
120
|
+
|
|
121
|
+
async def main():
|
|
122
|
+
browser = await launch_async()
|
|
123
|
+
page = await browser.new_page()
|
|
124
|
+
await page.goto("https://example.com")
|
|
125
|
+
print(await page.title())
|
|
126
|
+
await browser.close()
|
|
127
|
+
|
|
128
|
+
asyncio.run(main())
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### `launch_context()`
|
|
132
|
+
|
|
133
|
+
Convenience function that creates browser + context with common options:
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
from cloakbrowser import launch_context
|
|
137
|
+
|
|
138
|
+
context = launch_context(
|
|
139
|
+
user_agent="Custom UA",
|
|
140
|
+
viewport={"width": 1920, "height": 1080},
|
|
141
|
+
locale="en-US",
|
|
142
|
+
timezone_id="America/New_York",
|
|
143
|
+
)
|
|
144
|
+
page = context.new_page()
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Utility Functions
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
from cloakbrowser import binary_info, clear_cache, ensure_binary
|
|
151
|
+
|
|
152
|
+
# Check binary installation status
|
|
153
|
+
print(binary_info())
|
|
154
|
+
# {'version': '145.0.7723.116', 'platform': 'darwin-arm64', 'installed': True, ...}
|
|
155
|
+
|
|
156
|
+
# Force re-download
|
|
157
|
+
clear_cache()
|
|
158
|
+
|
|
159
|
+
# Pre-download binary (e.g., during Docker build)
|
|
160
|
+
ensure_binary()
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Configuration
|
|
164
|
+
|
|
165
|
+
| Env Variable | Default | Description |
|
|
166
|
+
|---|---|---|
|
|
167
|
+
| `CLOAKBROWSER_BINARY_PATH` | — | Skip download, use a local Chromium binary |
|
|
168
|
+
| `CLOAKBROWSER_CACHE_DIR` | `~/.cloakbrowser` | Binary cache directory |
|
|
169
|
+
| `CLOAKBROWSER_DOWNLOAD_URL` | GitHub Releases | Custom download URL for binary |
|
|
170
|
+
|
|
171
|
+
## Use With Existing Playwright Code
|
|
172
|
+
|
|
173
|
+
If you have existing Playwright scripts, migration is one line:
|
|
174
|
+
|
|
175
|
+
```diff
|
|
176
|
+
- from playwright.sync_api import sync_playwright
|
|
177
|
+
- pw = sync_playwright().start()
|
|
178
|
+
- browser = pw.chromium.launch()
|
|
179
|
+
+ from cloakbrowser import launch
|
|
180
|
+
+ browser = launch()
|
|
181
|
+
|
|
182
|
+
page = browser.new_page()
|
|
183
|
+
page.goto("https://example.com")
|
|
184
|
+
# ... rest of your code works unchanged
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Comparison
|
|
188
|
+
|
|
189
|
+
| Feature | Playwright | playwright-stealth | undetected-chromedriver | Camoufox | CloakBrowser |
|
|
190
|
+
|---|---|---|---|---|---|
|
|
191
|
+
| reCAPTCHA v3 score | 0.1 | 0.3-0.5 | 0.3-0.7 | 0.7-0.9 | **0.9** |
|
|
192
|
+
| Cloudflare Turnstile | Fail | Sometimes | Sometimes | Pass | **Pass** |
|
|
193
|
+
| Patch level | None | JS injection | Config patches | C++ (Firefox) | **C++ (Chromium)** |
|
|
194
|
+
| Survives Chrome updates | N/A | Breaks often | Breaks often | Yes | **Yes** |
|
|
195
|
+
| Maintained | Yes | Stale | Stale | Dead (2025) | **Active** |
|
|
196
|
+
| Browser engine | Chromium | Chromium | Chrome | Firefox | **Chromium** |
|
|
197
|
+
| Playwright API | Native | Native | No (Selenium) | No | **Native** |
|
|
198
|
+
|
|
199
|
+
## Platforms
|
|
200
|
+
|
|
201
|
+
| Platform | Status |
|
|
202
|
+
|---|---|
|
|
203
|
+
| Linux x86_64 | Supported |
|
|
204
|
+
| macOS arm64 (Apple Silicon) | Coming soon |
|
|
205
|
+
| macOS x86_64 (Intel) | Coming soon |
|
|
206
|
+
| Windows | Planned |
|
|
207
|
+
|
|
208
|
+
## Examples
|
|
209
|
+
|
|
210
|
+
See the [`examples/`](examples/) directory:
|
|
211
|
+
- [`basic.py`](examples/basic.py) — Launch and load a page
|
|
212
|
+
- [`recaptcha_score.py`](examples/recaptcha_score.py) — Check your reCAPTCHA v3 score
|
|
213
|
+
- [`stealth_test.py`](examples/stealth_test.py) — Run against all detection services
|
|
214
|
+
|
|
215
|
+
## FAQ
|
|
216
|
+
|
|
217
|
+
**Q: Is this legal?**
|
|
218
|
+
A: CloakBrowser is a browser. Using it is legal. What you do with it is your responsibility, just like with Chrome, Firefox, or any browser. We do not endorse violating website terms of service.
|
|
219
|
+
|
|
220
|
+
**Q: How is this different from Camoufox?**
|
|
221
|
+
A: Camoufox patched Firefox. We patch Chromium. Chromium means native Playwright support, larger ecosystem, and TLS fingerprints that match real Chrome. Also, Camoufox is no longer maintained (since March 2025).
|
|
222
|
+
|
|
223
|
+
**Q: Will detection sites eventually catch this?**
|
|
224
|
+
A: Possibly. Bot detection is an arms race. Source-level patches are harder to detect than config-level patches, but not impossible. We actively monitor and update when detection evolves.
|
|
225
|
+
|
|
226
|
+
**Q: Can I use my own proxy?**
|
|
227
|
+
A: Yes. Pass `proxy="http://user:pass@host:port"` to `launch()`.
|
|
228
|
+
|
|
229
|
+
**Q: Can I use this with Docker?**
|
|
230
|
+
A: Yes. Use `ensure_binary()` in your Dockerfile to pre-download the binary during image build.
|
|
231
|
+
|
|
232
|
+
## License
|
|
233
|
+
|
|
234
|
+
MIT — see [LICENSE](LICENSE).
|
|
235
|
+
|
|
236
|
+
## Contributing
|
|
237
|
+
|
|
238
|
+
Issues and PRs welcome. Contact: cloakhq@pm.me
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""cloakbrowser — Stealth Chromium that passes every bot detection test.
|
|
2
|
+
|
|
3
|
+
Drop-in Playwright replacement with source-level fingerprint patches.
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
from cloakbrowser import launch
|
|
7
|
+
|
|
8
|
+
browser = launch()
|
|
9
|
+
page = browser.new_page()
|
|
10
|
+
page.goto("https://protected-site.com")
|
|
11
|
+
browser.close()
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from .browser import launch, launch_async, launch_context
|
|
15
|
+
from .config import CHROMIUM_VERSION, DEFAULT_STEALTH_ARGS
|
|
16
|
+
from .download import binary_info, clear_cache, ensure_binary
|
|
17
|
+
from ._version import __version__
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"launch",
|
|
21
|
+
"launch_async",
|
|
22
|
+
"launch_context",
|
|
23
|
+
"ensure_binary",
|
|
24
|
+
"clear_cache",
|
|
25
|
+
"binary_info",
|
|
26
|
+
"CHROMIUM_VERSION",
|
|
27
|
+
"DEFAULT_STEALTH_ARGS",
|
|
28
|
+
"__version__",
|
|
29
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|