|
STTNet
|
API related to information security. More...
Classes | |
| struct | RateState |
| Runtime state for one limiter key (reused by multiple strategies). More... | |
| struct | ConnectionState |
| Security and limiter state for a single connection (fd). More... | |
| struct | IPInformation |
| Security state and connection set for a single IP. More... | |
| class | ConnectionLimiter |
| Unified connection & request security gate (IP-level + fd-level, multi-strategy limiting + blacklist). More... | |
Enumerations | |
| enum | RateLimitType { RateLimitType::Cooldown, RateLimitType::FixedWindow, RateLimitType::SlidingWindow, RateLimitType::TokenBucket } |
| Rate limiting algorithm / strategy type. More... | |
| enum | DefenseDecision : int { ALLOW = 0, DROP = 1, CLOSE = 2 } |
| Security decision returned by ConnectionLimiter. More... | |
API related to information security.
| enum stt::security::DefenseDecision : int |
Security decision returned by ConnectionLimiter.
Every connection/request must pass the limiter before entering business logic.
| Enumerator | |
|---|---|
| ALLOW | |
| DROP | |
| CLOSE | |
|
strong |
Rate limiting algorithm / strategy type.
Each strategy has different semantics. Choose based on business traffic patterns and your abuse/threat model.
times events occur within secs, all subsequent requests are rejected. The limiter only recovers after the system stays quiet for a full secs.secs. Allow at most times events within the window. Counter resets when the window ends.now, count events in (now - secs, now]; reject if count >= times.times (implementation-defined).| Enumerator | |
|---|---|
| Cooldown | |
| FixedWindow | |
| SlidingWindow | |
| TokenBucket | |
1.8.5