mirror of
https://github.com/CloakHQ/CloakBrowser.git
synced 2026-06-23 11:41:46 +02:00
refactor: remove dead stealth args, let binary handle GPU diversity
Remove --disable-blink-features=AutomationControlled (dead, binary handles navigator.webdriver at source level) and hardcoded GPU vendor/renderer flags. Binary auto-generates diverse GPU profiles from fingerprint seed. Improves fingerprint diversity -- previously every user shared the same GPU string. Bump to v0.3.21.
This commit is contained in:
@@ -6,6 +6,15 @@ Changes are tagged: **[wrapper]** for Python/JS wrapper, **[binary]** for Chromi
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## [0.3.21] — 2026-04-07
|
||||||
|
|
||||||
|
- **[wrapper]** Remove dead `--disable-blink-features=AutomationControlled` flag -- binary patch 009 already handles `navigator.webdriver` at source level
|
||||||
|
- **[wrapper]** Remove hardcoded GPU vendor/renderer flags -- binary auto-generates diverse, realistic GPU profiles from the fingerprint seed. Each seed gets a unique GPU instead of every user sharing the same one
|
||||||
|
- **[wrapper]** Allow `viewport=None` to disable viewport emulation in both Python and JS wrappers (thanks [@kitiho](https://github.com/kitiho), #107)
|
||||||
|
- **[wrapper]** Enable `geoip=True` in stealth test example to fix FingerprintJS detection
|
||||||
|
- **[meta]** Remove npm self-upgrade step in CI -- Node 22 ships with compatible npm
|
||||||
|
- **[docker]** Install `geoip2` in Docker image for GeoIP auto-detection support
|
||||||
|
|
||||||
## [0.3.20] — 2026-04-06
|
## [0.3.20] — 2026-04-06
|
||||||
|
|
||||||
- **[binary]** Upgrade Linux x64 build to 145.0.7632.159.9 — 48 source-level C++ patches (up from 42)
|
- **[binary]** Upgrade Linux x64 build to 145.0.7632.159.9 — 48 source-level C++ patches (up from 42)
|
||||||
|
|||||||
@@ -554,14 +554,10 @@ Every `launch()` call sets these automatically. The **wrapper** applies platform
|
|||||||
|------|--------------|---------------|----------|
|
|------|--------------|---------------|----------|
|
||||||
| `--fingerprint` | Random (10000–99999) | Random (10000–99999) | Master seed for canvas, WebGL, audio, fonts, client rects |
|
| `--fingerprint` | Random (10000–99999) | Random (10000–99999) | Master seed for canvas, WebGL, audio, fonts, client rects |
|
||||||
| `--fingerprint-platform` | `windows` | `macos` | `navigator.platform`, User-Agent OS, GPU pool selection |
|
| `--fingerprint-platform` | `windows` | `macos` | `navigator.platform`, User-Agent OS, GPU pool selection |
|
||||||
| `--fingerprint-gpu-vendor` | `NVIDIA Corporation` | `Google Inc. (Apple)` | WebGL `UNMASKED_VENDOR_WEBGL` |
|
|
||||||
| `--fingerprint-gpu-renderer` | `NVIDIA GeForce RTX 3070` | `ANGLE (Apple, ANGLE Metal Renderer: Apple M3, Unspecified Version)` | WebGL `UNMASKED_RENDERER_WEBGL` |
|
|
||||||
|
|
||||||
The binary auto-generates hardware concurrency (8), device memory (8), and screen dimensions (1920x1080 on Windows/Linux, 1440x900 on macOS) from the seed. Override with explicit flags if needed.
|
The binary auto-generates everything else from the seed: GPU, hardware concurrency, device memory, and screen dimensions. Each seed produces a unique, consistent fingerprint. Override with explicit flags if needed.
|
||||||
|
|
||||||
> **Using the binary directly?** It works out of the box with zero flags — the binary auto-spoofs everything. Pass `--fingerprint=seed` for a persistent identity, or use explicit flags like `--fingerprint-gpu-renderer` to override any auto-generated value.
|
> **Using the binary directly?** It works out of the box with zero flags -- the binary auto-spoofs everything. Pass `--fingerprint=seed` for a persistent identity, or use explicit flags like `--fingerprint-gpu-renderer` to override any auto-generated value.
|
||||||
|
|
||||||
> **Production tip:** For better stealth at scale, pass your own GPU, screen, and hardware values instead of relying on defaults. Custom parameters make your sessions harder to cluster by anti-bot systems that look for uniform fingerprint profiles.
|
|
||||||
|
|
||||||
### Additional Flags
|
### Additional Flags
|
||||||
|
|
||||||
@@ -569,6 +565,8 @@ Supported by the binary but **not set by default** — pass via `args` to custom
|
|||||||
|
|
||||||
| Flag | Controls |
|
| Flag | Controls |
|
||||||
|------|----------|
|
|------|----------|
|
||||||
|
| `--fingerprint-gpu-vendor` | WebGL `UNMASKED_VENDOR_WEBGL` (auto-generated from seed + platform) |
|
||||||
|
| `--fingerprint-gpu-renderer` | WebGL `UNMASKED_RENDERER_WEBGL` (auto-generated from seed + platform) |
|
||||||
| `--fingerprint-hardware-concurrency` | `navigator.hardwareConcurrency` (auto-generated: `8`) |
|
| `--fingerprint-hardware-concurrency` | `navigator.hardwareConcurrency` (auto-generated: `8`) |
|
||||||
| `--fingerprint-device-memory` | `navigator.deviceMemory` in GB (auto-generated: `8`) |
|
| `--fingerprint-device-memory` | `navigator.deviceMemory` in GB (auto-generated: `8`) |
|
||||||
| `--fingerprint-screen-width` | Screen width (auto-generated: `1920` Win/Linux, `1440` macOS) |
|
| `--fingerprint-screen-width` | Screen width (auto-generated: `1920` Win/Linux, `1440` macOS) |
|
||||||
@@ -598,11 +596,9 @@ browser = launch(args=["--fingerprint=42069"])
|
|||||||
browser = launch(stealth_args=False, args=[
|
browser = launch(stealth_args=False, args=[
|
||||||
"--fingerprint=42069",
|
"--fingerprint=42069",
|
||||||
"--fingerprint-platform=windows",
|
"--fingerprint-platform=windows",
|
||||||
"--fingerprint-gpu-vendor=NVIDIA Corporation",
|
|
||||||
"--fingerprint-gpu-renderer=NVIDIA GeForce RTX 3070",
|
|
||||||
])
|
])
|
||||||
|
|
||||||
# Override GPU to look like a different machine
|
# Override GPU to look like a specific machine
|
||||||
browser = launch(args=[
|
browser = launch(args=[
|
||||||
"--fingerprint-gpu-vendor=Intel Inc.",
|
"--fingerprint-gpu-vendor=Intel Inc.",
|
||||||
"--fingerprint-gpu-renderer=Intel Iris OpenGL Engine",
|
"--fingerprint-gpu-renderer=Intel Iris OpenGL Engine",
|
||||||
@@ -656,11 +652,11 @@ browser = await launch_async(args=["--remote-debugging-port=9242"])
|
|||||||
|
|
||||||
| Platform | Chromium | Patches | Status |
|
| Platform | Chromium | Patches | Status |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| Linux x86_64 | 145 | 42 | ✅ Latest |
|
| Linux x86_64 | 145 | 48 | ✅ Latest |
|
||||||
| Linux arm64 (RPi, Graviton) | 145 | 33 | ✅ |
|
| Linux arm64 (RPi, Graviton) | 145 | 48 | ✅ |
|
||||||
| macOS arm64 (Apple Silicon) | 145 | 26 | ✅ |
|
| macOS arm64 (Apple Silicon) | 145 | 26 | ✅ |
|
||||||
| macOS x86_64 (Intel) | 145 | 26 | ✅ |
|
| macOS x86_64 (Intel) | 145 | 26 | ✅ |
|
||||||
| Windows x86_64 | 145 | 33 | ✅ |
|
| Windows x86_64 | 145 | 48 | ✅ |
|
||||||
|
|
||||||
The wrapper auto-downloads the correct binary for your platform.
|
The wrapper auto-downloads the correct binary for your platform.
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = "0.3.20"
|
__version__ = "0.3.21"
|
||||||
|
|||||||
+3
-12
@@ -48,26 +48,17 @@ def get_default_stealth_args() -> list[str]:
|
|||||||
|
|
||||||
base = [
|
base = [
|
||||||
"--no-sandbox",
|
"--no-sandbox",
|
||||||
"--disable-blink-features=AutomationControlled",
|
|
||||||
f"--fingerprint={seed}",
|
f"--fingerprint={seed}",
|
||||||
]
|
]
|
||||||
|
|
||||||
if system == "Darwin":
|
if system == "Darwin":
|
||||||
# Tell the fingerprint patches we're on macOS so GPU/UA match natively
|
# Tell the fingerprint patches we're on macOS so GPU/UA match natively
|
||||||
return base + [
|
return base + ["--fingerprint-platform=macos"]
|
||||||
"--fingerprint-platform=macos",
|
|
||||||
"--fingerprint-gpu-vendor=Google Inc. (Apple)",
|
|
||||||
"--fingerprint-gpu-renderer=ANGLE (Apple, ANGLE Metal Renderer: Apple M3, Unspecified Version)",
|
|
||||||
]
|
|
||||||
|
|
||||||
# Linux/Windows: Windows fingerprint profile
|
# Linux/Windows: Windows fingerprint profile
|
||||||
# Hardware concurrency, device memory, screen, and window size are
|
# Hardware concurrency, device memory, screen, window size, and GPU are
|
||||||
# auto-generated by the binary from the seed (v14+).
|
# auto-generated by the binary from the seed (v14+).
|
||||||
return base + [
|
return base + ["--fingerprint-platform=windows"]
|
||||||
"--fingerprint-platform=windows",
|
|
||||||
"--fingerprint-gpu-vendor=Google Inc. (NVIDIA)",
|
|
||||||
"--fingerprint-gpu-renderer=ANGLE (NVIDIA, NVIDIA GeForce RTX 3070 (0x00002484) Direct3D11 vs_5_0 ps_5_0, D3D11)",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|||||||
+3
-3
@@ -203,11 +203,11 @@ const page = await browser.newPage();
|
|||||||
|
|
||||||
| Platform | Chromium | Patches | Status |
|
| Platform | Chromium | Patches | Status |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| Linux x86_64 | 145 | 33 | ✅ Latest |
|
| Linux x86_64 | 145 | 48 | ✅ Latest |
|
||||||
| Linux arm64 (RPi, Graviton) | 145 | 33 | ✅ Latest |
|
| Linux arm64 (RPi, Graviton) | 145 | 48 | ✅ Latest |
|
||||||
| macOS arm64 (Apple Silicon) | 145 | 26 | ✅ Latest |
|
| macOS arm64 (Apple Silicon) | 145 | 26 | ✅ Latest |
|
||||||
| macOS x86_64 (Intel) | 145 | 26 | ✅ Latest |
|
| macOS x86_64 (Intel) | 145 | 26 | ✅ Latest |
|
||||||
| Windows x86_64 | 145 | 33 | ✅ Latest |
|
| Windows x86_64 | 145 | 48 | ✅ Latest |
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cloakbrowser",
|
"name": "cloakbrowser",
|
||||||
"version": "0.3.20",
|
"version": "0.3.21",
|
||||||
"description": "Stealth Chromium that passes every bot detection test. Drop-in Playwright/Puppeteer replacement with source-level fingerprint patches.",
|
"description": "Stealth Chromium that passes every bot detection test. Drop-in Playwright/Puppeteer replacement with source-level fingerprint patches.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
+3
-14
@@ -211,27 +211,16 @@ export function getDefaultStealthArgs(): string[] {
|
|||||||
|
|
||||||
const base = [
|
const base = [
|
||||||
"--no-sandbox",
|
"--no-sandbox",
|
||||||
"--disable-blink-features=AutomationControlled",
|
|
||||||
`--fingerprint=${seed}`,
|
`--fingerprint=${seed}`,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isMac) {
|
if (isMac) {
|
||||||
// macOS: run as native Mac browser — GPU/UA match natively
|
// macOS: run as native Mac browser — GPU/UA match natively
|
||||||
return [
|
return [...base, "--fingerprint-platform=macos"];
|
||||||
...base,
|
|
||||||
"--fingerprint-platform=macos",
|
|
||||||
"--fingerprint-gpu-vendor=Google Inc. (Apple)",
|
|
||||||
"--fingerprint-gpu-renderer=ANGLE (Apple, ANGLE Metal Renderer: Apple M3, Unspecified Version)",
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Linux/Windows: spoof as Windows desktop
|
// Linux/Windows: spoof as Windows desktop
|
||||||
// Hardware concurrency, device memory, screen, and window size are
|
// Hardware concurrency, device memory, screen, window size, and GPU are
|
||||||
// auto-generated by the binary from the seed (v14+).
|
// auto-generated by the binary from the seed (v14+).
|
||||||
return [
|
return [...base, "--fingerprint-platform=windows"];
|
||||||
...base,
|
|
||||||
"--fingerprint-platform=windows",
|
|
||||||
"--fingerprint-gpu-vendor=Google Inc. (NVIDIA)",
|
|
||||||
"--fingerprint-gpu-renderer=ANGLE (NVIDIA, NVIDIA GeForce RTX 3070 (0x00002484) Direct3D11 vs_5_0 ps_5_0, D3D11)",
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,16 +21,17 @@ describe("config", () => {
|
|||||||
const isMac = process.platform === "darwin";
|
const isMac = process.platform === "darwin";
|
||||||
|
|
||||||
expect(args).toContain("--no-sandbox");
|
expect(args).toContain("--no-sandbox");
|
||||||
expect(args).toContain("--disable-blink-features=AutomationControlled");
|
|
||||||
|
|
||||||
if (isMac) {
|
if (isMac) {
|
||||||
expect(args).toContain("--fingerprint-platform=macos");
|
expect(args).toContain("--fingerprint-platform=macos");
|
||||||
// macOS: no hardware-concurrency or GPU spoofing (uses native values)
|
|
||||||
expect(args.some((a) => a.includes("hardware-concurrency"))).toBe(false);
|
|
||||||
} else {
|
} else {
|
||||||
expect(args).toContain("--fingerprint-platform=windows");
|
expect(args).toContain("--fingerprint-platform=windows");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GPU flags removed — binary auto-generates from seed + platform
|
||||||
|
expect(args.some((a) => a.includes("fingerprint-gpu-vendor"))).toBe(false);
|
||||||
|
expect(args.some((a) => a.includes("fingerprint-gpu-renderer"))).toBe(false);
|
||||||
|
|
||||||
// Should have a random fingerprint seed
|
// Should have a random fingerprint seed
|
||||||
const fingerprintArg = args.find((a) => a.startsWith("--fingerprint="));
|
const fingerprintArg = args.find((a) => a.startsWith("--fingerprint="));
|
||||||
expect(fingerprintArg).toBeDefined();
|
expect(fingerprintArg).toBeDefined();
|
||||||
|
|||||||
@@ -133,10 +133,14 @@ class TestStealthArgs:
|
|||||||
with patch("cloakbrowser.config.platform.system", return_value="Darwin"):
|
with patch("cloakbrowser.config.platform.system", return_value="Darwin"):
|
||||||
args = get_default_stealth_args()
|
args = get_default_stealth_args()
|
||||||
assert "--fingerprint-platform=macos" in args
|
assert "--fingerprint-platform=macos" in args
|
||||||
assert any("Apple" in a for a in args)
|
# GPU flags removed — binary auto-generates from seed + platform
|
||||||
|
assert not any("fingerprint-gpu-vendor" in a for a in args)
|
||||||
|
assert not any("fingerprint-gpu-renderer" in a for a in args)
|
||||||
|
|
||||||
def test_linux_windows_profile(self):
|
def test_linux_windows_profile(self):
|
||||||
with patch("cloakbrowser.config.platform.system", return_value="Linux"):
|
with patch("cloakbrowser.config.platform.system", return_value="Linux"):
|
||||||
args = get_default_stealth_args()
|
args = get_default_stealth_args()
|
||||||
assert "--fingerprint-platform=windows" in args
|
assert "--fingerprint-platform=windows" in args
|
||||||
assert any("NVIDIA" in a for a in args)
|
# GPU flags removed — binary auto-generates from seed + platform
|
||||||
|
assert not any("fingerprint-gpu-vendor" in a for a in args)
|
||||||
|
assert not any("fingerprint-gpu-renderer" in a for a in args)
|
||||||
|
|||||||
Reference in New Issue
Block a user