The stealth system previously injected all 12 init scripts unconditionally into every browser engine. Chromium-specific scripts (window.chrome stubs, ANGLE WebGL strings, CDP cleanup, HeadlessChrome UA strip) were no-ops or actively suspicious on Firefox, while Firefox-specific headless vectors were unaddressed. Split stealthInitScripts into three categories: - stealthCommonScripts (4): webdriver, outerWidth/Height, permissions, Notification - stealthChromiumScripts (8): existing Chromium-specific scripts - stealthFirefoxScripts (5): new Firefox-specific stealth: - navigator.webdriver getOwnPropertyDescriptor hardening - WebGL renderer spoof with Mesa/Intel strings - mozInnerScreenX/Y non-zero spoof - navigator.hardwareConcurrency normalization - PDF.js plugin list override browser_init.go now selects common + engine-specific scripts based on opt.Browser. Tests updated with per-category validation and cross- contamination checks. Closes #69 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5.3 KiB
5.3 KiB