feat(browse): extend GSTACK_CHROMIUM_PATH support to headless launch#1614
feat(browse): extend GSTACK_CHROMIUM_PATH support to headless launch#1614shohu wants to merge 1 commit into
Conversation
launchHeaded() already reads GSTACK_CHROMIUM_PATH to select a custom Chromium binary, but launch() (headless mode, the default $B goto path) ignores the env var and always falls back to Playwright's bundled binary. This change applies the same pattern to launch(): if GSTACK_CHROMIUM_PATH is set and the path exists, pass it as executablePath to chromium.launch(). If unset or the binary is missing, falls back to standard Playwright Chromium automatically (existsSync guard). Motivation: enables drop-in use of stealth Chromium forks (e.g. CloakBrowser) for headless automation without forking gstack or patching vendored files.
8a119d8 to
16100e2
Compare
|
One correctness edge with the headless path: this applies Can this mirror |
Summary
launchHeaded()already readsGSTACK_CHROMIUM_PATHto select a custom Chromium binary, butlaunch()(headless mode — the default$B gotopath) ignores the env var and always falls back to Playwright's bundled binary.This PR applies the same pattern to
launch():GSTACK_CHROMIUM_PATHis set and the path exists (existsSyncguard), it is passed asexecutablePathtochromium.launch()[browse] Using custom Chromium: <path>on startup when active (matches the debug style used elsewhere)Motivation
This enables drop-in use of stealth Chromium forks (e.g. CloakBrowser) for headless automation without needing to fork gstack or patch vendored files after every upgrade.
Before:
GSTACK_CHROMIUM_PATHonly worked for headed mode ($B connect). Headless$B gotoalways used Playwright's bundled binary regardless.After: Setting
GSTACK_CHROMIUM_PATHin the environment applies to both headless and headed mode consistently.Usage
Test plan
bun run buildpasses$B gotowithGSTACK_CHROMIUM_PATHset →navigator.webdriver: false,window.chrome: object$B gotowithoutGSTACK_CHROMIUM_PATH→ falls back to standard Playwright Chromium (existsSync guard)launchHeaded) behaviour🤖 Generated with Claude Code