pub struct DdosConfig {
pub max_connections_per_ip: u32,
pub max_new_connections_per_second: u32,
pub max_request_body_size: usize,
pub slowloris_timeout_ms: u64,
pub header_count_limit: usize,
pub header_size_limit: usize,
pub throttle_threshold_pct: u32,
}Expand description
Configuration for DDoS mitigation.
Fields§
§max_connections_per_ip: u32Maximum concurrent connections per IP.
max_new_connections_per_second: u32Maximum new connections per second (global).
max_request_body_size: usizeMaximum request body size in bytes.
slowloris_timeout_ms: u64Slowloris timeout in milliseconds (not enforced at WAF layer, but exposed for server config).
header_count_limit: usizeMaximum number of headers per request.
header_size_limit: usizeMaximum total header size in bytes.
throttle_threshold_pct: u32Connection rate threshold to start auto-throttling (percentage of max, 0-100).
Trait Implementations§
Source§impl Clone for DdosConfig
impl Clone for DdosConfig
Source§fn clone(&self) -> DdosConfig
fn clone(&self) -> DdosConfig
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 DdosConfig
impl Debug for DdosConfig
Source§impl Default for DdosConfig
impl Default for DdosConfig
Source§impl<'de> Deserialize<'de> for DdosConfig
impl<'de> Deserialize<'de> for DdosConfig
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 DdosConfig
impl RefUnwindSafe for DdosConfig
impl Send for DdosConfig
impl Sync for DdosConfig
impl Unpin for DdosConfig
impl UnsafeUnpin for DdosConfig
impl UnwindSafe for DdosConfig
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