pub struct NavigatorProfile {
pub user_agent: String,
pub platform: String,
pub vendor: String,
pub hardware_concurrency: u8,
pub device_memory: u8,
pub max_touch_points: u8,
pub webgl_vendor: String,
pub webgl_renderer: String,
}Expand description
A bundle of navigator property values that together form a convincing browser identity.
All properties are validated at construction time to guarantee that
platform matches the OS fragment in user_agent.
§Example
use stygian_browser::stealth::NavigatorProfile;
let p = NavigatorProfile::mac_chrome();
assert_eq!(p.platform, "MacIntel");
assert!(p.user_agent.contains("Mac OS X"));Fields§
§user_agent: StringFull User-Agent string (navigator.userAgent and the HTTP header).
platform: StringPlatform string e.g. "Win32", "MacIntel", "Linux x86_64".
vendor: StringBrowser vendor ("Google Inc.").
hardware_concurrency: u8Logical CPU core count. Realistic values: 4, 8, 12, 16.
device_memory: u8Device RAM in GiB. Realistic values: 4, 8, 16.
max_touch_points: u8Maximum simultaneous touch points (0 = no touchscreen, 10 = tablet/phone).
webgl_vendor: StringWebGL vendor string (only used when StealthConfig::randomize_webgl is true).
webgl_renderer: StringWebGL renderer string.
Implementations§
Sourcepub fn windows_chrome() -> Self
pub fn windows_chrome() -> Self
A typical Windows 10 Chrome 120 profile.
Sourcepub fn mac_chrome() -> Self
pub fn mac_chrome() -> Self
A typical macOS Chrome 120 profile.
Sourcepub fn linux_chrome() -> Self
pub fn linux_chrome() -> Self
A typical Linux Chrome profile (common in data-centre environments).
Trait Implementations§
Source§fn clone(&self) -> NavigatorProfile
fn clone(&self) -> NavigatorProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more