go test ./... passes (all existing + new stealth tests)
Manual verification against archive.ph or similar bot-detecting site
## Summary
- Add `Stealth *bool`, `LaunchArgs []string`, and `InitScripts []string` fields to `BrowserOptions`
- Stealth mode is **enabled by default** for all browser types (`NewBrowser` and `NewInteractiveBrowser`)
- Stealth applies: `navigator.webdriver` override, plugin/mimeType spoofing, `window.chrome` stub, `outerWidth`/`outerHeight` fix, and Chromium-specific `--disable-blink-features=AutomationControlled`
- `LaunchArgs` and `InitScripts` allow consumers to add custom browser flags and pre-page JavaScript
- CLI flag `--no-stealth` added to disable stealth mode from command-line tools
- Unit tests for `mergeOptions` behavior with the new fields
Closes #56
## Test plan
- [x] `go build ./...` passes
- [x] `go test ./...` passes (all existing + new stealth tests)
- [ ] Manual verification against archive.ph or similar bot-detecting site
Add anti-bot-detection evasion support to reduce blocking by sites like
archive.ph. Stealth mode is enabled by default for all browsers and applies
common evasions: navigator.webdriver override, plugin/mimeType spoofing,
window.chrome stub, and outerWidth/outerHeight fixes. For Chromium,
--disable-blink-features=AutomationControlled is also added.
New BrowserOptions fields:
- Stealth *bool: toggle stealth presets (default true)
- LaunchArgs []string: custom browser launch arguments
- InitScripts []string: JavaScript injected before page scripts
Closes#56
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Claude
merged commit 917569dd0b into main2026-02-17 20:11:50 +00:00
Claude
deleted branch feature/stealth-mode2026-02-17 20:11:51 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Stealth *bool,LaunchArgs []string, andInitScripts []stringfields toBrowserOptionsNewBrowserandNewInteractiveBrowser)navigator.webdriveroverride, plugin/mimeType spoofing,window.chromestub,outerWidth/outerHeightfix, and Chromium-specific--disable-blink-features=AutomationControlledLaunchArgsandInitScriptsallow consumers to add custom browser flags and pre-page JavaScript--no-stealthadded to disable stealth mode from command-line toolsmergeOptionsbehavior with the new fieldsCloses #56
Test plan
go build ./...passesgo test ./...passes (all existing + new stealth tests)