metadata
name: cloakbrowser
description: >-
Stealth browser automation with CloakBrowser β bypasses bot detection
(Cloudflare, reCAPTCHA, FingerprintJS). Use for web scraping, screenshot
capture, site testing, and anti-detect browsing.
CloakBrowser β Stealth Browser Automation
CloakBrowser is a patched Chromium binary with 58 C++ source-level fingerprint patches. Drop-in Playwright replacement that passes Cloudflare Turnstile, reCAPTCHA v3 (0.9 score), FingerprintJS, BrowserScan, and 30+ detection sites.
Install
uv pip install --python /opt/hermes/.venv/bin/python3 /opt/data/workspace/github/cloakbrowser
Binary auto-downloads to ~/.cloakbrowser/ on first use.
Quick Usage (Python)
from cloakbrowser import launch
browser = launch(headless=True, humanize=True)
page = browser.new_page()
page.goto("https://protected-site.com")
print(page.title())
browser.close()
CLI Wrapper
Located at: /opt/data/workspace/github/cloakbrowser/tools/cloak_browse.py
# Fetch page text
python3 /opt/data/workspace/github/cloakbrowser/tools/cloak_browse.py fetch https://example.com
# Screenshot
python3 /opt/data/workspace/github/cloakbrowser/tools/cloak_browse.py screenshot https://example.com -o /tmp/shot.png --viewport 1920x1080
# Extract structured content (title, links, meta, text)
python3 /opt/data/workspace/github/cloakbrowser/tools/cloak_browse.py extract https://example.com
# Execute JS on page
python3 /opt/data/workspace/github/cloakbrowser/tools/cloak_browse.py js https://example.com "document.title"
# Run stealth fingerprint test
python3 /opt/data/workspace/github/cloakbrowser/tools/cloak_browse.py stealth-test
# Show binary info
python3 /opt/data/workspace/github/cloakbrowser/tools/cloak_browse.py info
Key Launch Options
browser = launch(
headless=True, # Headless mode (default True)
humanize=True, # Human-like mouse/keyboard/scroll
proxy="http://user:pass@proxy:port", # Residential proxy
geoip=True, # Auto-detect timezone from proxy IP
args=["--remote-debugging-port=9242"], # Extra Chrome args
extension_paths=["/path/to/ext"], # Load Chrome extensions
)
Integration Patterns
With Crawl4AI
from cloakbrowser import launch_async
cb = await launch_async(headless=True, args=["--remote-debugging-port=9243"])
# Connect Crawl4AI via CDP: http://127.0.0.1:9243
With browser-use (AI agent)
from cloakbrowser import launch_async
cb = await launch_async(headless=True, args=["--remote-debugging-port=9242"])
# Connect browser-use via CDP: http://127.0.0.1:9242
Persistent context (cookies survive restart)
from cloakbrowser import launch_persistent_context
ctx = launch_persistent_context("./my-profile", headless=False)
page = ctx.new_page()
page.goto("https://site.com")
ctx.close() # Cookies saved to ./my-profile
Stealth Verified
- navigator.webdriver: False
- Real plugins (5), languages, platform
- WebGL: Google Inc. (NVIDIA) β real GPU vendor
- Canvas fingerprint: unique per session (random seed)
- Passes bot.incolumitas.com, BrowserScan, Cloudflare Turnstile
Hermes Integration (Default Browser)
CloakBrowser is configured as the default browser for Hermes via agent-browser CLI.
Config file: /opt/data/.env
AGENT_BROWSER_EXECUTABLE_PATH=/opt/data/home/.cloakbrowser/chromium-146.0.7680.177.5/chrome
AGENT_BROWSER_ARGS=--no-sandbox,--fingerprint-platform=windows
AGENT_BROWSER_ENGINE=chrome
How it works:
- Hermes browser tools (
browser_navigate,browser_click, etc.) useagent-browserCLI agent-browserlaunches Chromium βAGENT_BROWSER_EXECUTABLE_PATHpoints it to CloakBrowser's stealth binaryAGENT_BROWSER_ARGSpasses fingerprint spoofing flags- Result: all Hermes browser automation runs through stealth Chromium
Verify integration:
# Check agent-browser uses CloakBrowser
export AGENT_BROWSER_EXECUTABLE_PATH=/opt/data/home/.cloakbrowser/chromium-146.0.7680.177.5/chrome
agent-browser --engine chrome --session test open "https://example.com"
agent-browser --session test eval "navigator.webdriver" # Should be false
agent-browser --session test close
Update binary path after CloakBrowser update:
python3 -c "from cloakbrowser.config import get_binary_path; print(get_binary_path())"
# Update AGENT_BROWSER_EXECUTABLE_PATH in /opt/data/.env with new path
Pitfalls
- Headless detection: Some sites detect headless even with patches. Use
headless=Falsefor stubborn sites. - Datacenter IPs: Residential proxy needed for sites that check IP reputation.
- First run downloads ~120MB binary to
~/.cloakbrowser/. Subsequent runs use cache. - No pip: Use
uv pip install --python /opt/hermes/.venv/bin/python3instead of barepip. - Playwright API: CloakBrowser returns standard Playwright Browser/Context objects β same API.
Environment Variables
CLOAKBROWSER_BINARY_PATHβ Use custom binary (skip download)CLOAKBROWSER_CACHE_DIRβ Custom cache directoryCLOAKBROWSER_AUTO_UPDATE=falseβ Disable auto-update checksCLOAKBROWSER_DOWNLOAD_URLβ Custom download mirror