pub struct InjectionTrackerConfig {
pub max_records: usize,
pub record_ttl_secs: u64,
pub min_attempts_for_detection: u32,
pub timing_variance_threshold_ms: f64,
pub rapid_request_threshold_rps: f64,
pub max_fingerprint_changes: u32,
pub js_success_rate_threshold: f64,
pub response_time_window: usize,
}Expand description
Configuration for the injection tracker.
All fields have sensible defaults via Default implementation.
Can be serialized/deserialized for configuration file support.
Fields§
§max_records: usizeMaximum number of records to keep (default: 100_000)
record_ttl_secs: u64Record time-to-live in seconds (default: 3600 = 1 hour)
min_attempts_for_detection: u32Minimum attempts before making headless determination (default: 5)
timing_variance_threshold_ms: f64Response time variance threshold (ms) below which is suspicious (default: 50.0) Low variance indicates automated timing
rapid_request_threshold_rps: f64Requests per second threshold above which is suspicious (default: 10.0)
max_fingerprint_changes: u32Maximum fingerprint changes allowed before anomaly (default: 20) Excessive changes indicate fingerprint spoofing
js_success_rate_threshold: f64JS success rate threshold below which is suspicious (default: 0.1 = 10%)
response_time_window: usizeNumber of response times to keep for variance calculation (default: 20)
Trait Implementations§
Source§impl Clone for InjectionTrackerConfig
impl Clone for InjectionTrackerConfig
Source§fn clone(&self) -> InjectionTrackerConfig
fn clone(&self) -> InjectionTrackerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InjectionTrackerConfig
impl Debug for InjectionTrackerConfig
Source§impl Default for InjectionTrackerConfig
impl Default for InjectionTrackerConfig
Source§impl<'de> Deserialize<'de> for InjectionTrackerConfigwhere
InjectionTrackerConfig: Default,
impl<'de> Deserialize<'de> for InjectionTrackerConfigwhere
InjectionTrackerConfig: Default,
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>,
Auto Trait Implementations§
impl Freeze for InjectionTrackerConfig
impl RefUnwindSafe for InjectionTrackerConfig
impl Send for InjectionTrackerConfig
impl Sync for InjectionTrackerConfig
impl Unpin for InjectionTrackerConfig
impl UnsafeUnpin for InjectionTrackerConfig
impl UnwindSafe for InjectionTrackerConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more