kesslerio-stealth-browser
Anti-bot browser automation using Camoufox and Nodriver.
Installation
npx clawhub@latest install kesslerio-stealth-browserView the full skill documentation and source below.
Documentation
Stealth Browser Skill π₯·
Anti-bot browser automation that bypasses Cloudflare Turnstile, Datadome, and aggressive fingerprinting.
When to Use
- Standard Playwright/Selenium gets blocked
- Site shows Cloudflare challenge or "checking your browser"
- Need to scrape Airbnb, Yelp, or similar protected sites
playwright-stealthisn't working anymore
Tool Selection
| Target Difficulty | Tool | When to Use |
| Browser | Camoufox | All protected sites - Cloudflare, Datadome, Yelp, Airbnb |
| API Only | curl_cffi | No browser needed, just TLS spoofing |
Quick Start
All scripts run in pybox distrobox for isolation.
β οΈ Use python3.14 explicitly - pybox may have multiple Python versions with different packages installed.
1. Setup (First Time)
# Install tools in pybox (use python3.14)
distrobox-enter pybox -- python3.14 -m pip install camoufox curl_cffi
# Camoufox browser downloads automatically on first run (~700MB Firefox fork)
2. Fetch a Protected Page
Browser (Camoufox):
distrobox-enter pybox -- python3.14 scripts/camoufox-fetch.py "" --headless
API only (curl_cffi):
distrobox-enter pybox -- python3.14 scripts/curl-api.py ""
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OpenClaw Agent β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β distrobox-enter pybox -- python3.14 scripts/xxx.py β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β pybox Container β
β βββββββββββββββ βββββββββββββββ β
β β Camoufox β β curl_cffi β β
β β (Firefox) β β (TLS spoof)β β
β βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Tool Details
Camoufox
- What: Custom Firefox build with C++ level stealth patches
- Pros: Best fingerprint evasion, passes Turnstile automatically
- Cons: ~700MB download, Firefox-based
- Best for: All protected sites - Cloudflare, Datadome, Yelp, Airbnb
curl_cffi
- What: Python HTTP client with browser TLS fingerprint spoofing
- Pros: No browser overhead, very fast
- Cons: No JS execution, API endpoints only
- Best for: Known API endpoints, mobile app reverse engineering
Critical: Proxy Requirements
Datacenter IPs (AWS, DigitalOcean) = INSTANT BLOCK on Airbnb/Yelp
You MUST use residential or mobile proxies:
# Example proxy config
proxy = ""
See references/proxy-setup.md for proxy configuration.
Behavioral Tips
Sites like Airbnb/Yelp use behavioral analysis. To avoid detection:
Headless Mode Warning
β οΈ Old --headless flag is DETECTED. Options:
headless="new" (Chrome 109+)# Xvfb approach (Linux)
Xvfb :99 -screen 0 1920x1080x24 &
export DISPLAY=:99
python scripts/camoufox-fetch.py ""
Troubleshooting
| Problem | Solution |
| "Access Denied" immediately | Use residential proxy |
| Cloudflare challenge loops | Try Camoufox instead of Nodriver |
| Browser crashes in pybox | Install missing deps: sudo dnf install gtk3 libXt |
| TLS fingerprint blocked | Use curl_cffi with impersonate="chrome120" |
| Turnstile checkbox appears | Add mouse movement, increase wait time |
ModuleNotFoundError: camoufox | Use python3.14 not python or python3 |
greenlet segfault (exit 139) | Python version mismatch - use python3.14 explicitly |
libstdc++.so.6 errors | NixOS lib path issue - use python3.14 in pybox |
Python Version Issues (NixOS/pybox)
The pybox container may have multiple Python versions with separate site-packages:
# Check which Python has camoufox
distrobox-enter pybox -- python3.14 -c "import camoufox; print('OK')"
# Wrong (may use different Python)
distrobox-enter pybox -- python3.14 scripts/camoufox-session.py ...
# Correct (explicit version)
distrobox-enter pybox -- python3.14 scripts/camoufox-session.py ...
If you get segfaults or import errors, always use python3.14 explicitly.
Examples
Scrape Airbnb Listing
distrobox-enter pybox -- python3.14 scripts/camoufox-fetch.py \
"" \
--headless --wait 10 \
--screenshot airbnb.png
Scrape Yelp Business
distrobox-enter pybox -- python3.14 scripts/camoufox-fetch.py \
"" \
--headless --wait 8 \
--output yelp.html
API Scraping with TLS Spoofing
distrobox-enter pybox -- python3.14 scripts/curl-api.py \
"" \
--headers '{"Authorization": "Bearer xxx"}'
Session Management
Persistent sessions allow reusing authenticated state across runs without re-logging in.
Quick Start
# 1. Login interactively (headed browser opens)
distrobox-enter pybox -- python3.14 scripts/camoufox-session.py \
--profile airbnb --login ""
# Complete login in browser, then press Enter to save session
# 2. Reuse session in headless mode
distrobox-enter pybox -- python3.14 scripts/camoufox-session.py \
--profile airbnb --headless ""
# 3. Check session status
distrobox-enter pybox -- python3.14 scripts/camoufox-session.py \
--profile airbnb --status ""
Flags
| Flag | Description |
--profile NAME | Named profile for session storage (required) |
--login | Interactive login mode - opens headed browser |
--headless | Use saved session in headless mode |
--status | Check if session appears valid |
--export-cookies FILE | Export cookies to JSON for backup |
--import-cookies FILE | Import cookies from JSON file |
Storage
- Location:
~/.stealth-browser/profiles// - Permissions: Directory
700, files600 - Profile names: Letters, numbers,
_,-only (1-63 chars)
Cookie Handling
- Save: All cookies from all domains stored in browser profile
- Restore: Only cookies matching target URL domain are used
- SSO: If redirected to Google/auth domain, re-authenticate once and profile updates
Login Wall Detection
The script detects session expiry using multiple signals:
/login, /signin, /authIf detected during --headless mode, you'll see:
π Login wall signals: url-path, password-form
Re-run with --login to refresh the session.
Remote Login (SSH)
Since --login requires a visible browser, you need display forwarding:
X11 Forwarding (Preferred):
# Connect with X11 forwarding
ssh -X user@server
# Run login (opens browser on your local machine)
distrobox-enter pybox -- python3.14 scripts/camoufox-session.py \
--profile mysite --login ""
VNC Alternative:
# On server: start VNC session
vncserver :1
# On client: connect to VNC
vncviewer server:1
# In VNC session: run login
distrobox-enter pybox -- python3.14 scripts/camoufox-session.py \
--profile mysite --login ""
Security Notes
β οΈ Cookies are credentials. Treat profile directories like passwords:
- Profile dirs have
chmod 700(owner only) - Cookie exports have
chmod 600 - Don't share profiles or exported cookies over insecure channels
- Consider encrypting backups
Limitations
| Limitation | Reason |
| localStorage/sessionStorage not exported | Use browser profile instead (handles automatically) |
| IndexedDB not portable | Stored in browser profile, not cookie export |
| No parallel profile access | No file locking in v1; use one process per profile |
References
- references/proxy-setup.md β Proxy configuration guide
- references/fingerprint-checks.md β What anti-bot systems check