pub struct StealthProfile { /* private fields */ }Expand description
Combines StealthConfig (feature flags) with a NavigatorProfile
(identity values) and produces a single JavaScript injection script.
§Example
use stygian_browser::stealth::{NavigatorProfile, StealthConfig, StealthProfile};
let profile = StealthProfile::new(StealthConfig::default(), NavigatorProfile::windows_chrome());
let script = profile.injection_script();
assert!(script.contains("Win32"));
assert!(script.contains("NVIDIA"));Implementations§
Source§impl StealthProfile
impl StealthProfile
Sourcepub const fn new(config: StealthConfig, navigator: NavigatorProfile) -> Self
pub const fn new(config: StealthConfig, navigator: NavigatorProfile) -> Self
Build a new profile from config flags and identity values.
Sourcepub fn injection_script(&self) -> String
pub fn injection_script(&self) -> String
Generate the JavaScript to inject via
Page.addScriptToEvaluateOnNewDocument.
Returns an empty string if all stealth flags are disabled.
Auto Trait Implementations§
impl Freeze for StealthProfile
impl RefUnwindSafe for StealthProfile
impl Send for StealthProfile
impl Sync for StealthProfile
impl Unpin for StealthProfile
impl UnwindSafe for StealthProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more