pub struct ProxyLocation {
pub latitude: f64,
pub longitude: f64,
pub accuracy: f64,
pub timezone: String,
pub locale: String,
}Expand description
Geographic location metadata for geolocation consistency with a proxy.
When a proxy routes traffic through a specific region, the browser’s
navigator.geolocation API and timezone should match that region so that
fingerprint analysis cannot detect the mismatch.
§Example
use stygian_browser::webrtc::ProxyLocation;
let loc = ProxyLocation::new_us_east();
assert_eq!(loc.timezone, "America/New_York");
assert_eq!(loc.locale, "en-US");Fields§
§latitude: f64WGS-84 decimal latitude.
longitude: f64WGS-84 decimal longitude.
accuracy: f64Accuracy radius in metres (typical GPS: 10–50, cell/IP: 100–5000).
timezone: StringIANA timezone identifier, e.g. "America/New_York".
locale: StringBCP-47 locale tag, e.g. "en-US".
Implementations§
Source§impl ProxyLocation
impl ProxyLocation
Sourcepub fn new_us_east() -> Self
pub fn new_us_east() -> Self
US East Coast (New York) preset.
Sourcepub fn new_us_west() -> Self
pub fn new_us_west() -> Self
US West Coast (Los Angeles) preset.
Sourcepub fn new_eu_central() -> Self
pub fn new_eu_central() -> Self
Central Europe (Frankfurt) preset.
Trait Implementations§
Source§impl Clone for ProxyLocation
impl Clone for ProxyLocation
Source§fn clone(&self) -> ProxyLocation
fn clone(&self) -> ProxyLocation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyLocation
impl Debug for ProxyLocation
Source§impl<'de> Deserialize<'de> for ProxyLocation
impl<'de> Deserialize<'de> for ProxyLocation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProxyLocation
impl RefUnwindSafe for ProxyLocation
impl Send for ProxyLocation
impl Sync for ProxyLocation
impl Unpin for ProxyLocation
impl UnwindSafe for ProxyLocation
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