Skip to main content

Stealth Routes

Stealth routes use path-based semantics and the Chrome DevTools Protocol to provide stronger anti-detection than solutions like puppeteer-stealth. They are the recommended first step for BaaS users: changing your connection URL is all that's required to get started.

  • Stealth Route (Recommended) - /stealth Our recommended managed stealth environment with advanced anti-detection and realistic fingerprinting. This route applies comprehensive browser fingerprint mitigations and entropy injection for maximum effectiveness against bot detection systems.

  • Chromium Stealth - /chromium/stealth Optimized for our platform, this route applies a comprehensive set of fingerprinting mitigations and entropy injection tailored to Chromium. It modifies browser APIs with subtle, realistic values to closely emulate a real browser and reduce detectability. Chromium's flexibility allows this route to be better tailored at stealthiness compared to /chrome/stealth.

  • Chrome Stealth - /chrome/stealth Designed for the standard Chrome experience, this route delivers anti-detection protections adjusted to preserve Chrome's native behaviors, while also providing enhanced resistance to bot-detection systems.

RouteBrowserBest ForNotes
/stealthChromium/ChromeMost use casesRecommended. Managed environment with comprehensive fingerprint mitigations and entropy injection.
/chromium/stealthChromiumCustom configurationsChromium's flexibility allows more tailored stealthiness than /chrome/stealth.
/chrome/stealthChromeChrome-native behaviorPreserves Chrome's native behaviors while adding anti-detection protections.
note

Stealth routes modify browser behavior in ways that can produce unexpected results for some automation tasks. They are not the default for this reason. Use them when you are dealing with bot detection issues, not as a general-purpose browser configuration.

// Stealth (Recommended):
await puppeteer.connect({
browserWSEndpoint:
"wss://production-sfo.browserless.io/stealth?token=YOUR_API_TOKEN_HERE",
});

// Chromium:
await puppeteer.connect({
browserWSEndpoint:
"wss://production-sfo.browserless.io/chromium/stealth?token=YOUR_API_TOKEN_HERE",
});

// Chrome:
await puppeteer.connect({
browserWSEndpoint:
"wss://production-sfo.browserless.io/chrome/stealth?token=YOUR_API_TOKEN_HERE",
});

Customizing Stealth Flags

Stealth routes apply a comprehensive set of Chrome flags by default to optimize anti-detection behavior. However, you can selectively remove specific flags if needed for your use case. This is particularly useful when:

  • You have sufficient shared memory configured in your container and want to remove --disable-dev-shm-usage for better performance
  • You need to customize specific browser behaviors while maintaining other stealth protections
  • You're troubleshooting compatibility issues with certain websites

Removing Stealth Flags

Use the ignoreDefaultArgs parameter in your launch options to remove specific stealth flags. This parameter accepts an array of flag names to exclude from the default stealth configuration.

Example: Remove --disable-dev-shm-usage flag

import puppeteer from "puppeteer-core";

const launchOptions = {
ignoreDefaultArgs: ["--disable-dev-shm-usage"]
};

const queryParams = new URLSearchParams({
token: 'YOUR_API_TOKEN_HERE',
launch: JSON.stringify(launchOptions)
});

const browser = await puppeteer.connect({
browserWSEndpoint: `wss://production-sfo.browserless.io/chromium/stealth?${queryParams.toString()}`,
});

Example: Remove multiple flags

const launchOptions = {
ignoreDefaultArgs: [
"--disable-dev-shm-usage",
"--no-sandbox",
"--disable-infobars"
]
};
note
  • All stealth flags are included by default for optimal anti-detection behavior
  • Only flags explicitly listed in ignoreDefaultArgs will be removed
  • Other stealth protections remain active even when specific flags are removed
  • This feature is available on all stealth routes: /stealth, /chromium/stealth, and /chrome/stealth

Next Steps