B0tresch Stealth Browser
by @b0tresch
Anti-detection web browsing that bypasses bot detection, CAPTCHAs, and IP blocks using puppeteer-extra with stealth plugin and optional residential proxy sup...
clawhub install b0tresch-stealth-browserπ About This Skill
name: stealth-browser description: Anti-detection web browsing that bypasses bot detection, CAPTCHAs, and IP blocks using puppeteer-extra with stealth plugin and optional residential proxy support. Use when (1) websites block headless browsers or datacenter IPs, (2) need to bypass Cloudflare/Vercel protection, (3) accessing sites that detect automation (Reddit, Twitter/X, signup flows), (4) scraping protected content, or (5) automating web tasks that require human-like behavior.
Stealth Browser
Bypass bot detection and IP blocks with puppeteer-extra stealth plugin and optional Smartproxy residential proxy support.
When to Use
Tested Working On
β Relay.link (was blocked by Vercel, now works) β X/Twitter profiles β Bot detection tests (sannysoft.com) β Faucet sites with protection β Reddit (datacenter IP blocks)
Quick Start
# Basic usage (stealth only)
node scripts/browser.js "https://example.com"With residential proxy (bypasses IP blocks)
node scripts/browser.js "https://example.com" --proxyScreenshot
node scripts/browser.js "https://example.com" --proxy --screenshot output.pngGet HTML content
node scripts/browser.js "https://example.com" --proxy --htmlGet text content
node scripts/browser.js "https://example.com" --proxy --text
Setup
1. Install Dependencies
cd /path/to/skill
npm install
Required packages (automatically handled by npm install with included package.json):
puppeteer-extrapuppeteer-extra-plugin-stealthpuppeteer2. Configure Proxy (Optional but Recommended)
For bypassing IP-based blocks, set up Smartproxy residential proxy:
Create ~/.config/smartproxy/proxy.json:
{
"host": "proxy.smartproxy.net",
"port": "3120",
"username": "smart-ppz3iii4l2qr_area-US_life-30_session-xxxxx",
"password": "your-password"
}
Get credentials from Smartproxy dashboard: https://dashboard.smartproxy.com
Smartproxy session parameters:
_area-US β Use US residential IPs_life-30 β Session lasts 30 minutes_session-xxxxx β Sticky session (same IP for duration)Without proxy, the browser still uses stealth plugin to avoid detection, but may be blocked by IP-based protection.
How It Works
Stealth Features
The browser includes multiple anti-detection measures:
1. puppeteer-extra-plugin-stealth: Automatically applies all stealth evasions
- Removes navigator.webdriver flag
- Spoofs Chrome user agent and headers
- Fakes plugins, languages, permissions
- Removes automation signatures
2. Human-like behaviors: - Realistic viewport (1920x1080) - Updated user agent (Chrome 121) - Natural browser properties - No automation control flags
3. Residential proxy (when --proxy used):
- Routes through residential IPs
- Bypasses datacenter IP blocks
- Sticky sessions (same IP per session)
- Geographic targeting (US by default)
Detection Bypass Comparison
| Protection | Headless Puppeteer | Stealth Plugin | + Residential Proxy | |------------|-------------------|----------------|-------------------| | navigator.webdriver | β Detected | β Hidden | β Hidden | | User Agent | β Generic | β Realistic | β Realistic | | WebGL/Canvas | β Headless | β Spoofed | β Spoofed | | IP Blocks | β Datacenter | β Datacenter | β Residential | | Cloudflare | β Blocked | β οΈ Sometimes | β Usually works | | Turnstile CAPTCHA | β Blocked | β Blocked | β οΈ Reduced chance |
Usage Examples
Example 1: Check if Site Detects Automation
# Test on bot detection site
node scripts/browser.js "https://bot.sannysoft.com" --screenshot detection.png
Look for green checkmarks = undetected, red = detected.
Example 2: Scrape Protected Page
# Get page text content
node scripts/browser.js "https://protected-site.com" --proxy --text > output.txt
Example 3: Monitor Site Changes
# Take daily screenshot for comparison
node scripts/browser.js "https://target-site.com" --proxy --screenshot "$(date +%Y-%m-%d).png"
Example 4: Extract Structured Data
import { browse } from './scripts/browser.js';const result = await browse('https://example.com', {
proxy: true,
html: true
});
// Parse result.html with cheerio or similar
console.log(result.html);
Proxy Cost Considerations
Smartproxy residential pricing:
When to use proxy:
When stealth-only is enough:
Troubleshooting
Browser Launch Fails
Error: Failed to launch the browser process
Solution: Install required system dependencies:
# Debian/Ubuntu
sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 \
libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 \
libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 \
libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 \
libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation \
libappindicator1 libnss3 lsb-release xdg-utils wget
Proxy Authentication Fails
Error: net::ERR_PROXY_AUTH_REQUESTED
Solution: Check proxy credentials in ~/.config/smartproxy/proxy.json. Verify username/password are correct in Smartproxy dashboard.
Still Getting Detected
Try these:
1. Update session ID in proxy username (forces new IP):
"username": "smart-ppz3iii4l2qr_area-US_life-30_session-NEW_RANDOM_STRING"
2. Increase wait time before interacting with page:
await page.goto(url, { waitUntil: 'networkidle2' });
await page.waitForTimeout(5000); // Wait 5s
3. Check detection test:
node scripts/browser.js "https://bot.sannysoft.com" --proxy --screenshot test.png
4. Try different geographic area (if specific region is blocked):
"username": "smart-ppz3iii4l2qr_area-GB_life-30_session-xxxxx"
Limitations
Security Notes
Capabilities: This skill is read-only β it fetches web pages, captures screenshots, and extracts text/HTML. It does not perform any financial operations, value transfers, or wallet interactions.
Authentication: Proxy credentials are used solely for routing HTTP traffic through residential IPs. They do not grant access to any financial accounts or value-bearing systems.
~/.config/smartproxy/proxy.json with 600 permissions.See Also
β‘ When to Use
π‘ Examples
# Basic usage (stealth only)
node scripts/browser.js "https://example.com"With residential proxy (bypasses IP blocks)
node scripts/browser.js "https://example.com" --proxyScreenshot
node scripts/browser.js "https://example.com" --proxy --screenshot output.pngGet HTML content
node scripts/browser.js "https://example.com" --proxy --htmlGet text content
node scripts/browser.js "https://example.com" --proxy --text
βοΈ Configuration
1. Install Dependencies
cd /path/to/skill
npm install
Required packages (automatically handled by npm install with included package.json):
puppeteer-extrapuppeteer-extra-plugin-stealthpuppeteer2. Configure Proxy (Optional but Recommended)
For bypassing IP-based blocks, set up Smartproxy residential proxy:
Create ~/.config/smartproxy/proxy.json:
{
"host": "proxy.smartproxy.net",
"port": "3120",
"username": "smart-ppz3iii4l2qr_area-US_life-30_session-xxxxx",
"password": "your-password"
}
Get credentials from Smartproxy dashboard: https://dashboard.smartproxy.com
Smartproxy session parameters:
_area-US β Use US residential IPs_life-30 β Session lasts 30 minutes_session-xxxxx β Sticky session (same IP for duration)Without proxy, the browser still uses stealth plugin to avoid detection, but may be blocked by IP-based protection.
π Tips & Best Practices
Browser Launch Fails
Error: Failed to launch the browser process
Solution: Install required system dependencies:
# Debian/Ubuntu
sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 \
libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 \
libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 \
libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 \
libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation \
libappindicator1 libnss3 lsb-release xdg-utils wget
Proxy Authentication Fails
Error: net::ERR_PROXY_AUTH_REQUESTED
Solution: Check proxy credentials in ~/.config/smartproxy/proxy.json. Verify username/password are correct in Smartproxy dashboard.
Still Getting Detected
Try these:
1. Update session ID in proxy username (forces new IP):
"username": "smart-ppz3iii4l2qr_area-US_life-30_session-NEW_RANDOM_STRING"
2. Increase wait time before interacting with page:
await page.goto(url, { waitUntil: 'networkidle2' });
await page.waitForTimeout(5000); // Wait 5s
3. Check detection test:
node scripts/browser.js "https://bot.sannysoft.com" --proxy --screenshot test.png
4. Try different geographic area (if specific region is blocked):
"username": "smart-ppz3iii4l2qr_area-GB_life-30_session-xxxxx"