fix: enhance stealth mode with additional anti-detection measures
All checks were successful
CI / build (pull_request) Successful in 47s
CI / vet (pull_request) Successful in 46s
CI / test (pull_request) Successful in 49s

Add 7 new init scripts to cover WebGL fingerprinting, missing Chrome
APIs, permissions behavior, CDP artifacts, and HeadlessChrome UA string.
Enable Chromium's new headless mode (Channel: "chromium") when stealth
is active to use the full UI layer that is harder to detect.

Closes #58

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 22:45:12 +00:00
parent 917569dd0b
commit ce95fb1d89
3 changed files with 185 additions and 0 deletions

View File

@@ -92,6 +92,9 @@ func initBrowser(opt BrowserOptions) (*browserInitResult, error) {
if len(launchArgs) > 0 {
launchOpts.Args = launchArgs
}
if stealth && opt.Browser == BrowserChromium && headless {
launchOpts.Channel = playwright.String("chromium")
}
browser, err = bt.Launch(launchOpts)
if err != nil {
return nil, fmt.Errorf("failed to launch browser: %w", err)