Anemone Browser — Managed Browser for OpenClaw Agents
Headful Chrome with anti-detection, VNC takeover, and multi-session isolation.
Works on Mac, Linux, Docker — anywhere OpenClaw runs.
Setup
macOS
CODEBLOCK0
Detects Chrome, configures OpenClaw browser profile. After setup:
CODEBLOCK1
Note: macOS setup does NOT include VNC/noVNC. The user is expected to access
the Mac via their own remote desktop solution (e.g. macOS Screen Sharing, Tailscale,
or physical access). VNC takeover with noVNC links is only available on Linux.
Linux / Docker
CODEBLOCK2
INLINECODE0 outputs the noVNC URL, password, and CDP port. Safe to re-run.
OpenClaw Config
Setup scripts configure this automatically. Manual reference:
macOS:
CODEBLOCK3
Linux:
CODEBLOCK4
Multi-Session Window Isolation
Multiple sessions share one Chrome (same cookies/logins) but each gets its own window.
Rules (MUST follow):
- 1. On session start — open your own tab, save the targetId:
CODEBLOCK5
- 2. ALL subsequent calls — always include your targetId:
CODEBLOCK6
- 3. On session end — close your tab:
CODEBLOCK7
- 4. NEVER operate without targetId — you'll land on another session's tab.
- 5. NEVER pick another session's tab from
browser action=tabs.
Opening a new window (not tab) via CDP:
CODEBLOCK8
Architecture:
CODEBLOCK9
VNC Takeover (CRITICAL)
When hitting a CAPTCHA, login wall, or any blocker, send the user a noVNC link:
CODEBLOCK10
Constructing the link:
Linux/Docker (from start.sh output):
https://57.129.90.145:10150/vnc.html?password=e0GGP4xeMUL5ga&autoconnect=true&resize=scale
- - IP: server's public or Tailscale IP
- Port + password: from start.sh output
macOS: VNC takeover is NOT available. The user must access the Mac directly
(physical access, macOS Screen Sharing, or their own remote desktop solution).
Takeover flow:
- 1. Agent detects blocker (CAPTCHA, login, 2FA)
- Agent sends noVNC link to user
- User opens link → sees Chrome → solves the problem
- User confirms done → agent continues
Anti-Detection
- - Headful Chrome — no
HeadlessChrome in UA --disable-blink-features=AutomationControlled — no INLINECODE4- UA override via CDP if needed:
CODEBLOCK12
Security
- - SSL/TLS on noVNC (self-signed cert)
- Random 14-char password (Linux) or system auth (macOS)
- CDP: localhost only, never exposed to network
- Chrome Policy:
file://, javascript:, data:text/html blocked; extensions blocked; DevTools disabled
Important: No Kiosk Mode
Do NOT use Chrome's --kiosk flag. It hides the tab bar and address bar, making multi-window unusable via VNC. Use --start-maximized instead.
Anemone Browser — 面向OpenClaw代理的托管浏览器
具备反检测、VNC接管和多会话隔离功能的完整Chrome浏览器。
支持Mac、Linux、Docker——任何可运行OpenClaw的环境。
安装配置
macOS
bash
bash scripts/setup-mac.sh
检测Chrome,配置OpenClaw浏览器配置文件。安装完成后:
bash
openclaw browser start
代理的浏览器工具将自动生效
注意: macOS安装不包含VNC/noVNC。用户需通过自己的远程桌面方案(如macOS屏幕共享、Tailscale或物理访问)访问Mac。仅Linux支持带noVNC链接的VNC接管。
Linux / Docker
bash
安装依赖(仅一次)
bash scripts/setup.sh
启动浏览器 + VNC环境
bash scripts/start.sh [密码] [novnc端口] [cdp端口] [分辨率]
start.sh会输出noVNC URL、密码和CDP端口。可安全重复运行。
OpenClaw配置
安装脚本会自动配置此项。手动参考:
macOS:
json
{
browser: {
enabled: true,
defaultProfile: openclaw,
headless: false,
executablePath: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
}
}
Linux:
json
{
browser: {
enabled: true,
headless: false,
noSandbox: true,
executablePath: /usr/bin/google-chrome-stable
}
}
多会话窗口隔离
多个会话共享一个Chrome实例(相同cookie/登录信息),但每个会话拥有独立窗口。
规则(必须遵守):
- 1. 会话启动时——打开自己的标签页,保存targetId:
browser action=open targetUrl=https://example.com profile=openclaw
# 返回targetId——这是你的专属ID,请保存
- 2. 所有后续调用——始终包含你的targetId:
browser action=snapshot profile=openclaw targetId=<你的targetId>
browser action=navigate profile=openclaw targetId=<你的targetId> targetUrl=...
browser action=act profile=openclaw targetId=<你的targetId> ...
- 3. 会话结束时——关闭你的标签页:
browser action=close targetId=<你的targetId>
- 4. 切勿在没有targetId的情况下操作——你会误入其他会话的标签页。
- 5. 切勿从browser action=tabs中选择其他会话的标签页。
通过CDP打开新窗口(而非标签页):
python
import json, asyncio, websockets, urllib.request
async def opennewwindow(cdp_port, url):
version = json.loads(urllib.request.urlopen(fhttp://127.0.0.1:{cdp_port}/json/version).read())
async with websockets.connect(version[webSocketDebuggerUrl]) as ws:
await ws.send(json.dumps({
id: 1, method: Target.createTarget,
params: {url: url, newWindow: True}
}))
resp = json.loads(await ws.recv())
return resp[result][targetId]
架构:
Chrome(单个实例、单个配置文件、共享cookie)
├── 窗口 targetId=AAA → 会话A
├── 窗口 targetId=BBB → 会话B
└── 窗口 targetId=CCC → 会话C
VNC接管(关键)
遇到验证码、登录墙或任何拦截时,向用户发送noVNC链接:
https://:/vnc.html?password=<密码>&autoconnect=true&resize=scale
构建链接:
Linux/Docker(来自start.sh输出):
https://57.129.90.145:10150/vnc.html?password=e0GGP4xeMUL5ga&autoconnect=true&resize=scale
- - IP:服务器的公网或Tailscale IP
- 端口+密码:来自start.sh输出
macOS: 不支持VNC接管。用户必须直接访问Mac(物理访问、macOS屏幕共享或自己的远程桌面方案)。
接管流程:
- 1. 代理检测到拦截(验证码、登录、双因素认证)
- 代理向用户发送noVNC链接
- 用户打开链接→看到Chrome→解决问题
- 用户确认完成→代理继续执行
反检测
- - 完整Chrome — UA中无HeadlessChrome
- --disable-blink-features=AutomationControlled — 无navigator.webdriver=true
- 通过CDP覆盖UA(如需):
json
{method: Network.setUserAgentOverride, params: {
userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/131.0.0.0 Safari/537.36
}}
安全性
- - noVNC使用SSL/TLS(自签名证书)
- 随机14字符密码(Linux)或系统认证(macOS)
- CDP:仅限localhost,永不暴露到网络
- Chrome策略:阻止file://、javascript:、data:text/html;阻止扩展;禁用DevTools
重要提示:禁用自助服务终端模式
请勿使用Chrome的--kiosk标志。它会隐藏标签栏和地址栏,使多窗口在VNC中无法使用。请改用--start-maximized。