@websirnik

Patchright Stealth Browser

OpenClaw plugin: interactive stealth browser via Patchright (real Chrome, per-session isolation) for bot-detected sites.

当前版本
v0.1.0
bundle-plugin社区source-linked

Patchright Stealth Browser — OpenClaw plugin

An OpenClaw plugin that adds an interactive, stealth browser driven by Patchright (a patched Playwright that closes the Runtime.enable / navigator.webdriver CDP leaks). It launches real Google Chrome via launchPersistentContext — the only path on which Patchright's stealth patches actually apply — so it can read sites behind bot detection (DataDome / Cloudflare / Akamai) that block OpenClaw's native (CDP-attach) browser.

Why a separate browser

OpenClaw's native browser attaches to Chrome over CDP (connectOverCDP), which bypasses Patchright's patches entirely. To get the stealth, Patchright must launch the browser itself — hence this dedicated, separate browser instance. Use the native browser tool for ordinary sites; use these stealth_* tools when a site fingerprints or challenges automation.

Tools

All interactive tools require a session key (pass your agent name → isolated Chrome + profile):

ToolPurpose
stealth_navigateOpen/navigate to a URL
stealth_contentRead page text (or HTML)
stealth_click / stealth_fill / stealth_type / stealth_pressInteract (Playwright selectors)
stealth_waitWait for selector / load state / URL / delay
stealth_evaluateRun JS in the page, return the result
stealth_screenshotSave a screenshot
stealth_statusList sessions / inspect one
stealth_closeClose a session (or all)

A bundled skill (skills/patchright-stealth/SKILL.md, surfaced to the model) tells each agent when to reach for these tools and to pass session: "<its-own-name>".

Per-session isolation

The OpenClaw gateway is one shared process, so the plugin loads once and is shared by every agent. Each distinct session value gets its own Chrome instance and persistent profile at ~/.openclaw/browser/patchright-stealth-profile-<session>, so agents never collide.

Config (env vars)

VarDefaultMeaning
PATCHRIGHT_CHANNELchromeChrome channel / executablePath
PATCHRIGHT_HEADLESSunset (headful)set 1 to run headless (more detectable)
PATCHRIGHT_PROFILE_ROOT~/.openclaw/browserwhere per-session profiles live

Build & install

npm install
npm run build
openclaw plugins install --link .   # local dev
openclaw daemon restart

Verify stealth against fingerprint pages:

node stealth-check.mjs   # opens bot-detector.rebrowser.net + bot.sannysoft.com, prints signals

Caveats

Patchright fixes browser-side leaks, but bot detection also weighs IP reputation, TLS/JA3, and behavior. This is not a guaranteed bypass — slow down, use real waits, and respect site terms. Requires Google Chrome installed (uses channel: "chrome"). Console API is disabled under Patchright, so in-page console.* won't surface — return values from stealth_evaluate instead.

源码与版本

源码仓库

websirnik/patchright-stealth

打开仓库

源码提交

8d619dce019b3d3e6c5ae525b22bb80c1adaffdd

查看提交

安装命令

openclaw plugins install clawhub:@websirnik/patchright-stealth

元数据

  • 包名: @websirnik/patchright-stealth
  • 创建时间: 2026/06/13
  • 更新时间: 2026/06/13
  • 执行代码:
  • 源码标签: main

兼容性

  • 构建于 OpenClaw: 2026.6.6
  • 插件 API 范围: >=2026.6.6
  • 标签: latest
  • 文件数: 14