pub struct ProgressionConfig {Show 18 fields
pub failures_before_escalate: u32,
pub escalation_cooldown_secs: u64,
pub auto_de_escalate_secs: u64,
pub skip_to_block_threshold: u32,
pub enable_cookie: bool,
pub enable_js_challenge: bool,
pub enable_captcha: bool,
pub enable_tarpit: bool,
pub risk_threshold_cookie: f64,
pub risk_threshold_js: f64,
pub risk_threshold_captcha: f64,
pub risk_threshold_block: f64,
pub block_page_html: String,
pub block_status_code: u16,
pub captcha_page_html: String,
pub cleanup_interval_secs: u64,
pub max_states: usize,
pub max_escalation_history: usize,
}Expand description
Configuration for progression manager
Fields§
§failures_before_escalate: u32Failures before escalating to next level (default: 3)
escalation_cooldown_secs: u64Cooldown between escalations in seconds (default: 60)
auto_de_escalate_secs: u64Time without incident before de-escalating in seconds (default: 3600 = 1 hour)
skip_to_block_threshold: u32Total failures that skip directly to block (default: 10)
Enable cookie challenges (default: true)
enable_js_challenge: boolEnable JS PoW challenges (default: true)
enable_captcha: boolEnable CAPTCHA challenges (default: false - stub)
enable_tarpit: boolEnable tarpit challenges (default: true)
Risk score threshold for cookie (default: 0.2)
risk_threshold_js: f64Risk score threshold for JS challenge (default: 0.4)
risk_threshold_captcha: f64Risk score threshold for CAPTCHA/tarpit (default: 0.6)
risk_threshold_block: f64Risk score threshold for block (default: 0.8)
block_page_html: StringBlock page HTML template
block_status_code: u16Block status code (default: 403)
captcha_page_html: StringCAPTCHA page HTML template (stub)
cleanup_interval_secs: u64Background cleanup interval in seconds (default: 300)
max_states: usizeMax states to track (default: 100_000)
max_escalation_history: usizeMax escalation history entries per actor (default: 100) Prevents unbounded memory growth from malicious actors
Trait Implementations§
Source§impl Clone for ProgressionConfig
impl Clone for ProgressionConfig
Source§fn clone(&self) -> ProgressionConfig
fn clone(&self) -> ProgressionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProgressionConfig
impl Debug for ProgressionConfig
Auto Trait Implementations§
impl Freeze for ProgressionConfig
impl RefUnwindSafe for ProgressionConfig
impl Send for ProgressionConfig
impl Sync for ProgressionConfig
impl Unpin for ProgressionConfig
impl UnsafeUnpin for ProgressionConfig
impl UnwindSafe for ProgressionConfig
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