Initial commit: Rampart v0.2.0
Multi-layer DDoS protection for Minecraft servers. - rampart-core: Edge node with XDP/eBPF + Rust L7 filtering - rampart-manager: REST API with JWT auth, Redis sync - rampart-cli: CLI tool for operators - velocity-plugin: Domain check, HMAC verify, server registry, load balancer - paper-plugin: Auto-registration, heartbeat, HMAC verify - dashboard: React + Vite web UI for management
This commit is contained in:
commit
cf9608ce5d
159 changed files with 15341 additions and 0 deletions
41
crates/rampart-core/src/xdp/mod.rs
Normal file
41
crates/rampart-core/src/xdp/mod.rs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#[cfg(feature = "xdp")]
|
||||
pub struct XdpFilter {
|
||||
interface: String,
|
||||
}
|
||||
|
||||
#[cfg(feature = "xdp")]
|
||||
impl XdpFilter {
|
||||
pub fn new(interface: &str) -> Self {
|
||||
Self {
|
||||
interface: interface.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
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(not(feature = "xdp"))]
|
||||
pub struct XdpFilter;
|
||||
|
||||
#[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(())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue