

























@@ -316,15 +316,29 @@ Notes:
316316## Direct WebSocket CDP providers
317317318318Some hosted browser services expose a **direct WebSocket** endpoint rather than
319-the standard HTTP-based CDP discovery (`/json/version`). OpenClaw supports both:
320-321-- **HTTP(S) endpoints** — OpenClaw calls `/json/version` to discover the
322- WebSocket debugger URL, then connects.
323-- **WebSocket endpoints** (`ws://` / `wss://`) — OpenClaw connects directly,
324- skipping `/json/version`. Use this for services like
325-[Browserless](https://browserless.io),
326-[Browserbase](https://www.browserbase.com), or any provider that hands you a
327- WebSocket URL.
319+the standard HTTP-based CDP discovery (`/json/version`). OpenClaw accepts three
320+CDP URL shapes and picks the right connection strategy automatically:
321+322+- **HTTP(S) discovery** — `http://host[:port]` or `https://host[:port]`.
323+ OpenClaw calls `/json/version` to discover the WebSocket debugger URL, then
324+ connects. No WebSocket fallback.
325+- **Direct WebSocket endpoints** — `ws://host[:port]/devtools/<kind>/<id>` or
326+`wss://...` with a `/devtools/browser|page|worker|shared_worker|service_worker/<id>`
327+ path. OpenClaw connects directly via a WebSocket handshake and skips
328+`/json/version` entirely.
329+- **Bare WebSocket roots** — `ws://host[:port]` or `wss://host[:port]` with no
330+`/devtools/...` path (e.g. [Browserless](https://browserless.io),
331+[Browserbase](https://www.browserbase.com)). OpenClaw tries HTTP
332+`/json/version` discovery first (normalising the scheme to `http`/`https`);
333+ if discovery returns a `webSocketDebuggerUrl` it is used, otherwise OpenClaw
334+ falls back to a direct WebSocket handshake at the bare root. This covers
335+ both Chrome-style remote debug ports and WebSocket-only providers.
336+337+Plain `ws://host:port` / `wss://host:port` without a `/devtools/...` path
338+pointed at a local Chrome instance is supported via the discovery-first
339+fallback — Chrome only accepts WebSocket upgrades on the specific per-browser
340+or per-target path returned by `/json/version`, so a bare-root handshake alone
341+would fail.
328342329343### Browserbase
330344此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。