v0.3: 6-layer architecture complete
Layers: Layer 1: XDP/eBPF — TCP state machine, SYN throttle, blacklist, ringbuf Layer 2: PoW Challenge — SHA-256 hashcash, dynamic difficulty, constant-time verify Layer 3: Rust Core — HMAC handshake, rate limit, death code (existing) Layer 4: Velocity — Physics check, CAPTCHA, protocol verification Layer 5: Paper — Heartbeat, auto-registration (existing) Layer 6: Traffic Intel — EWMA, 168h profiling, reputation, alerts Infra: XDP→Prometheus metrics, ClickHouse + Grafana dashboard, Docker Compose Testing: 100-IP DDoS simulation, MHDDoS ref analysis, load test report Fixes: VarInt sign extension UB, pure ACK deadlock, RST/FIN cleanup Ref: MHDDoS, Sonar, LimboFilter, AtomGuard, Infrarust, MC-XDP-eBPF, PowGo
This commit is contained in:
parent
414d3be659
commit
6d76a7eeb1
66 changed files with 4529 additions and 1003 deletions
|
|
@ -1,41 +1,17 @@
|
|||
#[cfg(feature = "xdp")]
|
||||
pub struct XdpFilter {
|
||||
interface: String,
|
||||
}
|
||||
mod stats;
|
||||
pub use stats::XdpStats;
|
||||
|
||||
#[cfg(feature = "xdp")]
|
||||
impl XdpFilter {
|
||||
pub fn new(interface: &str) -> Self {
|
||||
Self {
|
||||
interface: interface.to_string(),
|
||||
}
|
||||
}
|
||||
mod filter;
|
||||
#[cfg(feature = "xdp")]
|
||||
pub use filter::XdpFilter;
|
||||
|
||||
pub fn load(&self) -> anyhow::Result<()> {
|
||||
tracing::info!("XDP filter loaded on {}", self.interface);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn unload(&self) -> anyhow::Result<()> {
|
||||
tracing::info!("XDP filter unloaded from {}", self.interface);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "xdp")]
|
||||
mod metrics;
|
||||
#[cfg(feature = "xdp")]
|
||||
pub use metrics::XdpMetrics;
|
||||
|
||||
#[cfg(not(feature = "xdp"))]
|
||||
pub struct XdpFilter;
|
||||
|
||||
mod noop;
|
||||
#[cfg(not(feature = "xdp"))]
|
||||
impl XdpFilter {
|
||||
pub fn new(_interface: &str) -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
pub fn load(&self) -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn unload(&self) -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
pub use noop::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue