cdp-tunnel is a Chrome extension and proxy server that bridges Chrome's DevTools Protocol (CDP) to WebSocket, enabling remote browser control via Playwright or Puppeteer. v2.10.9 (stable) supports multiple simultaneous clients with message isolation, auto-reconnect, and a configuration UI. The npm package provides CLI commands (setup, start, status, diagnose) and an extensible proxy. Key differentiators: acts as a Chrome extension rather than requiring a separate Browser instance, allowing you to control an existing user's browser; supports both 'create' and 'takeover' modes for flexible page management. Requires Node.js >=16.
npm install cdp-tunnelNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Starts the CDP Tunnel proxy server and shows how to connect with Playwright to control an existing browser.
Use the 'takeover' mode if you need to share pages across clients.
Update your client connections to use port 9221 instead of 9220.
Replace `cdp-tunnel init` with `cdp-tunnel setup`.
Go to chrome://extensions, enable Developer mode, click 'Load unpacked' and select the extension directory provided by `cdp-tunnel setup`.
Ensure `cdp-tunnel start` is running and specify the correct port: `chromium.connectOverCDP('http://localhost:9221')`.Open the extension's configuration page, add a connection with WebSocket URL `ws://localhost:9221/plugin`.
Ensure you call `chromium.connectOverCDP('http://localhost:9221')` and not an invalid endpoint.