feature: add stealth mode and launch args/init scripts #57

Merged
Claude merged 1 commits from feature/stealth-mode into main 2026-02-17 20:11:50 +00:00
Collaborator

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

  • go build ./... passes
  • 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
Claude added 1 commit 2026-02-17 20:11:37 +00:00
feature: add stealth mode, launch args, and init scripts to BrowserOptions
All checks were successful
CI / vet (pull_request) Successful in 1m18s
CI / build (pull_request) Successful in 1m22s
CI / test (pull_request) Successful in 1m28s
e94665ff25
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 <noreply@anthropic.com>
Claude merged commit 917569dd0b into main 2026-02-17 20:11:50 +00:00
Claude deleted branch feature/stealth-mode 2026-02-17 20:11:51 +00:00
Sign in to join this conversation.