From 5d7f7360d889030d70492a86302aaf45db557e33 Mon Sep 17 00:00:00 2001 From: CloakHQ Date: Tue, 3 Mar 2026 21:19:34 +0100 Subject: [PATCH] =?UTF-8?q?refactor:=20simplify=20stealth=20args=20?= =?UTF-8?q?=E2=80=94=20rely=20on=20binary=20auto-generation=20(v14+)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Binary v14+ auto-generates hardware concurrency, device memory, screen dimensions, and window size from the fingerprint seed. Remove these explicit flags from Python/JS wrapper defaults and update README: - Remove 5 flags from get_default_stealth_args() in both wrappers - Move hardware-concurrency, device-memory, screen-width, screen-height to the Additional Flags table with auto-generated defaults documented - Update code examples to use --fingerprint instead of --window-size - Simplify fingerprint defaults table to show only wrapper-set flags --- README.md | 16 ++++++++-------- cloakbrowser/config.py | 7 ++----- js/README.md | 2 +- js/src/config.ts | 9 +++------ 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 363ec75..cc5b3e8 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ browser = launch(headless=False) browser = launch(proxy="http://user:pass@proxy:8080") # With extra Chrome args -browser = launch(args=["--disable-gpu", "--window-size=1920,1080"]) +browser = launch(args=["--disable-gpu"]) # With timezone and locale (sets both binary flags and Playwright context) browser = launch(timezone="America/New_York", locale="en-US") @@ -283,7 +283,7 @@ const browser = await launch(); const browser = await launch({ headless: false, proxy: 'http://user:pass@proxy:8080', - args: ['--window-size=1920,1080'], + args: ['--fingerprint=12345'], timezone: 'America/New_York', locale: 'en-US', }); @@ -370,13 +370,10 @@ Every `launch()` call sets these automatically. Defaults are **platform-aware** |------|--------------|---------------|----------| | `--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-hardware-concurrency` | `8` | *(not set — uses real value)* | `navigator.hardwareConcurrency` | | `--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` | -| `--fingerprint-device-memory` | `8` | *(not set)* | `navigator.deviceMemory` | -| `--fingerprint-screen-width` | `1920` | *(not set)* | Screen width reporting | -| `--fingerprint-screen-height` | `1080` | *(not set)* | Screen height reporting | -| `--window-size` | `1920,1080` | *(not set)* | Browser window dimensions | + +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. > **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. @@ -388,6 +385,10 @@ Supported by the binary but **not set by default** — pass via `args` to custom | Flag | Controls | |------|----------| +| `--fingerprint-hardware-concurrency` | `navigator.hardwareConcurrency` (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-height` | Screen height (auto-generated: `1080` Win/Linux, `900` macOS) | | `--fingerprint-brand` | Browser brand: `Chrome`, `Edge`, `Opera`, `Vivaldi` | | `--fingerprint-brand-version` | Brand version (UA + Client Hints) | | `--fingerprint-platform-version` | Client Hints platform version | @@ -409,7 +410,6 @@ browser = launch(args=["--fingerprint=42069"]) browser = launch(stealth_args=False, args=[ "--fingerprint=42069", "--fingerprint-platform=windows", - "--fingerprint-hardware-concurrency=8", "--fingerprint-gpu-vendor=NVIDIA Corporation", "--fingerprint-gpu-renderer=NVIDIA GeForce RTX 3070", ]) diff --git a/cloakbrowser/config.py b/cloakbrowser/config.py index 3553a75..e11b4f7 100644 --- a/cloakbrowser/config.py +++ b/cloakbrowser/config.py @@ -52,15 +52,12 @@ def get_default_stealth_args() -> list[str]: ] # Linux/Windows: Windows fingerprint profile + # Hardware concurrency, device memory, screen, and window size are + # auto-generated by the binary from the seed (v14+). return base + [ "--fingerprint-platform=windows", - "--fingerprint-hardware-concurrency=8", - "--fingerprint-device-memory=8", "--fingerprint-gpu-vendor=NVIDIA Corporation", "--fingerprint-gpu-renderer=NVIDIA GeForce RTX 3070", - "--fingerprint-screen-width=1920", - "--fingerprint-screen-height=1080", - "--window-size=1920,1080", ] diff --git a/js/README.md b/js/README.md index 4f64d85..b41d89f 100644 --- a/js/README.md +++ b/js/README.md @@ -72,7 +72,7 @@ const browser = await launch({ headless: false }); // Extra Chrome args const browser = await launch({ - args: ['--window-size=1920,1080'], + args: ['--fingerprint=12345'], }); // With timezone and locale (sets --fingerprint-timezone and --lang binary flags) diff --git a/js/src/config.ts b/js/src/config.ts index 1dfa75e..40987f2 100644 --- a/js/src/config.ts +++ b/js/src/config.ts @@ -210,16 +210,13 @@ export function getDefaultStealthArgs(): string[] { ]; } - // Linux/Windows: Windows fingerprint profile + // Linux/Windows: spoof as Windows desktop + // Hardware concurrency, device memory, screen, and window size are + // auto-generated by the binary from the seed (v14+). return [ ...base, "--fingerprint-platform=windows", - "--fingerprint-hardware-concurrency=8", - "--fingerprint-device-memory=8", "--fingerprint-gpu-vendor=NVIDIA Corporation", "--fingerprint-gpu-renderer=NVIDIA GeForce RTX 3070", - "--fingerprint-screen-width=1920", - "--fingerprint-screen-height=1080", - "--window-size=1920,1080", ]; }