Repository navigation
Conversation
A small Go server that looks like browserless v2 from the outside but runs no Puppeteer: each WebSocket connection gets its own Chrome, traffic is proxied unchanged, and Chrome's process group is killed when the connection ends. /json/version starts the session's Chrome and returns its real metadata with a reachable ws URL; unclaimed browsers are stopped after 30s. DESIGN.md lists the browserless pitfalls it avoids.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A self-hosted replacement for browserless, aimed at Ferrum and Cuprite users: a small Go server (
docker/) and two images,ghcr.io/rubycdp/chromeandghcr.io/rubycdp/chromium, for amd64 and arm64.Why
Most remote-Chrome issues reported here come from browserless's own logic, not from CDP. Its Puppeteer resets the viewport (#592, #492), it writes a raw HTTP 408 onto a live socket (#538), it reports
0.0.0.0as the WebSocket host (#501), and it leaves Chrome processes and zombies behind (#505, #364).docker/DESIGN.mdlists all of them.How
httputil.ReverseProxy. Nothing else talks to the client's targets./json/versionis answered on the fly. It starts the session's Chrome, returns its real metadata, and rewrites the ws URL to a reachable host while keeping the query. A Chrome nobody connects to is stopped after 30s. Connections to/claim a Chrome already started with the same query, sows_url:clients don't start two./,/chrome,/chromium,/devtools/browser/<id>, with or without a trailing slash, plus/health.debian:trixie-slimwith dumb-init as PID 1..deb) or Debian Chromium.mainit publisheslatest, the major version and the full version as multi-arch tags.Testing
Run locally on arm64 with Ferrum, against both images and against the bare binary with a local Chrome:
url:andws_url:flows, including/chrome/;quit;docker stopstopping everything in about 0.15s.The amd64 images and this workflow haven't run yet. This PR is their first run.
Not in this PR
CONCURRENT/QUEUED/TIMEOUT, thelaunch=query parameter, and the DevTools viewer proxy.HEALTHCHECKand Go tests.window_sizeremotely, and a fix soContext#add_targetnever makes a service worker the default page.