Expand description
Stealth configuration and anti-detection features
Provides navigator property spoofing and CDP injection scripts that make a headless Chrome instance appear identical to a real browser.
§Overview
-
Navigator spoofing — Override
navigator.webdriver,platform,userAgent,hardwareConcurrency,deviceMemory,maxTouchPoints, andvendorviaObject.definePropertyso properties are non-configurable and non-writable (harder to detect the override). -
WebGL spoofing — Replace
getParameteronWebGLRenderingContextandWebGL2RenderingContextto return controlled vendor/renderer strings.
§Example
use stygian_browser::stealth::{NavigatorProfile, StealthConfig, StealthProfile};
let profile = NavigatorProfile::windows_chrome();
let script = StealthProfile::new(StealthConfig::default(), profile).injection_script();
assert!(script.contains("'webdriver'"));Structs§
- Navigator
Profile - A bundle of navigator property values that together form a convincing browser identity.
- Stealth
Config - Feature flags controlling which stealth techniques are active.
- Stealth
Profile - Combines
StealthConfig(feature flags) with aNavigatorProfile(identity values) and produces a single JavaScript injection script.
Functions§
- apply_
stealth_ to_ page - Inject all stealth scripts into a freshly opened browser page.