[package]
name = "goalkeeper"
authors = [ "Finn Bear" ]
version = "0.3.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "DoS and DDoS mitigation utilities"
repository = "https://github.com/finnbear/goalkeeper"
exclude = ["fuzz/"]

[dependencies]
log = "0.4.17"
fxhash = "0.2.1"
socket2 = { version = "0.5.8", features = ["all"], optional = true }
axum = { version = "0.8.1", default-features = false, optional = true }
axum-server = { version = "0.8", optional = true }
tokio = { version = "1.39.3", features = ["net"], default-features = false, optional = true }
tower = { version = "0.5", optional = true }
pin-project = { version = "1.1", optional = true }

[dev-dependencies]
axum = { version = "=0.8.1", features = ["ws"], default-features = false }
env_logger = "0.11.8"
futures-util = "0.3.31"
hyper = { version = "=1.8.1" }
hyper-util = { version = "=0.1.20", features = [ "tokio" ] }
rand = "0.8.4"
tokio = { version = "1.39.3", features = ["net", "rt-multi-thread"], default-features = false }
tokio-websockets = { version = "0.12.3", features = ["client", "rand", "ring"], default-features = false}

[features]
default = []
tokio = ["dep:tokio", "socket2"]
axum = ["dep:axum", "axum-server", "tokio", "tower", "pin-project"]

[[example]]
name = "axum_ddos"
required-features = ["axum"]

[package.metadata.docs.rs]
all-features = true
