2026-03-10 23:38:19 +00:00
|
|
|
[package]
|
|
|
|
|
name = "sunbeam-proxy"
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
|
2026-03-10 23:38:19 +00:00
|
|
|
[lib]
|
|
|
|
|
name = "sunbeam_proxy"
|
|
|
|
|
path = "src/lib.rs"
|
|
|
|
|
|
2026-03-10 23:38:19 +00:00
|
|
|
[dependencies]
|
|
|
|
|
# Pingora with rustls backend (pure Rust TLS, no BoringSSL C build)
|
2026-03-10 23:38:19 +00:00
|
|
|
pingora = { version = "0.8", features = ["rustls"] }
|
|
|
|
|
pingora-proxy = { version = "0.8", features = ["rustls"] }
|
|
|
|
|
pingora-core = { version = "0.8", features = ["rustls"] }
|
2026-03-10 23:38:20 +00:00
|
|
|
pingora-http = "0.8"
|
|
|
|
|
pingora-cache = { version = "0.8", features = ["rustls"] }
|
2026-03-10 23:38:19 +00:00
|
|
|
|
|
|
|
|
# HTTP header constants
|
|
|
|
|
http = "1"
|
|
|
|
|
|
|
|
|
|
# Config
|
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
|
|
|
toml = "0.8"
|
|
|
|
|
|
|
|
|
|
# Async
|
|
|
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
|
futures = "0.3"
|
|
|
|
|
async-trait = "0.1"
|
2026-03-10 23:38:19 +00:00
|
|
|
pin-project-lite = "0.2"
|
2026-03-10 23:38:19 +00:00
|
|
|
|
|
|
|
|
# Structured logging + OTEL
|
|
|
|
|
tracing = "0.1"
|
|
|
|
|
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
|
|
|
|
|
tracing-opentelemetry = "0.28"
|
|
|
|
|
opentelemetry = { version = "0.27", features = ["trace"] }
|
|
|
|
|
opentelemetry_sdk = { version = "0.27", features = ["rt-tokio"] }
|
|
|
|
|
opentelemetry-otlp = { version = "0.27", features = ["http-proto", "reqwest-client"] }
|
|
|
|
|
serde_json = "1"
|
|
|
|
|
anyhow = "1"
|
|
|
|
|
|
2026-03-10 23:38:21 +00:00
|
|
|
# CLI + serialization
|
2026-03-10 23:38:20 +00:00
|
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
|
bincode = "1"
|
|
|
|
|
rustc-hash = "2"
|
|
|
|
|
|
|
|
|
|
# Lock-free Arc swapping for hot-reload (scanner model)
|
|
|
|
|
arc-swap = "1"
|
|
|
|
|
|
|
|
|
|
# Reverse DNS for bot IP verification
|
|
|
|
|
dns-lookup = "2"
|
|
|
|
|
|
2026-03-10 23:38:20 +00:00
|
|
|
# Prometheus metrics
|
|
|
|
|
prometheus = "0.13"
|
|
|
|
|
|
2026-03-10 23:38:20 +00:00
|
|
|
# Request IDs
|
|
|
|
|
uuid = { version = "1", features = ["v4"] }
|
|
|
|
|
|
feat(static_files): add static file serving, SPA fallback, rewrites, body rewriting, and auth subrequests
Add static file serving with try_files chain ($uri, $uri.html,
$uri/index.html, fallback), regex-based URL rewrites compiled at
startup, response body find/replace for text/html and JS content,
auth subrequests with header capture for path routes, and custom
response headers per route. Extends RouteConfig with static_root,
fallback, rewrites, body_rewrites, and response_headers fields.
Signed-off-by: Sienna Meridian Satterwhite <sienna@sunbeam.pt>
2026-03-10 23:38:20 +00:00
|
|
|
# Static file serving and body rewriting
|
|
|
|
|
bytes = "1"
|
|
|
|
|
regex = "1"
|
|
|
|
|
|
|
|
|
|
# Auth subrequests
|
2026-03-10 23:38:20 +00:00
|
|
|
reqwest = { version = "0.12", features = ["rustls-tls", "blocking"], default-features = false }
|
feat(static_files): add static file serving, SPA fallback, rewrites, body rewriting, and auth subrequests
Add static file serving with try_files chain ($uri, $uri.html,
$uri/index.html, fallback), regex-based URL rewrites compiled at
startup, response body find/replace for text/html and JS content,
auth subrequests with header capture for path routes, and custom
response headers per route. Extends RouteConfig with static_root,
fallback, rewrites, body_rewrites, and response_headers fields.
Signed-off-by: Sienna Meridian Satterwhite <sienna@sunbeam.pt>
2026-03-10 23:38:20 +00:00
|
|
|
|
2026-03-10 23:38:19 +00:00
|
|
|
# Rustls crypto provider — must be installed before any TLS init
|
|
|
|
|
rustls = { version = "0.23", features = ["aws-lc-rs"] }
|
|
|
|
|
|
|
|
|
|
# K8s watcher for cert/config hot-reload
|
|
|
|
|
kube = { version = "3", features = ["runtime", "client"] }
|
|
|
|
|
k8s-openapi = { version = "0.27", features = ["v1_35"] }
|
|
|
|
|
libc = "0.2"
|
|
|
|
|
|
feat(cluster): add iroh-gossip dependencies and cluster config schema
Add iroh v0.96, iroh-gossip v0.96, blake3, hex, and rand v0.9 to
Cargo.toml. Define ClusterConfig, DiscoveryConfig, BandwidthClusterConfig,
and ModelsConfig in config.rs with serde defaults for gossip port (11204),
broadcast interval (1s), meter window (30s), and peer discovery methods
(k8s/bootstrap).
Signed-off-by: Sienna Meridian Satterwhite <sienna@sunbeam.pt>
2026-03-10 23:38:20 +00:00
|
|
|
# Cluster gossip (iroh QUIC + HyParView/PlumTree)
|
|
|
|
|
iroh = "0.96"
|
|
|
|
|
iroh-gossip = { version = "0.96", features = ["net"] }
|
|
|
|
|
blake3 = "1"
|
|
|
|
|
hex = "0.4"
|
|
|
|
|
rand = "0.9"
|
2026-03-10 23:38:21 +00:00
|
|
|
tempfile = "3"
|
|
|
|
|
|
|
|
|
|
# Dataset ingestion (CIC-IDS2017 CSV parsing)
|
|
|
|
|
csv = "1"
|
|
|
|
|
|
|
|
|
|
# burn-rs ML framework (training only, behind `training` feature)
|
2026-03-10 23:38:21 +00:00
|
|
|
burn = { version = "0.20", features = ["wgpu", "autodiff", "train"], optional = true }
|
2026-03-10 23:38:21 +00:00
|
|
|
|
|
|
|
|
[features]
|
|
|
|
|
training = ["burn"]
|
feat(cluster): add iroh-gossip dependencies and cluster config schema
Add iroh v0.96, iroh-gossip v0.96, blake3, hex, and rand v0.9 to
Cargo.toml. Define ClusterConfig, DiscoveryConfig, BandwidthClusterConfig,
and ModelsConfig in config.rs with serde defaults for gossip port (11204),
broadcast interval (1s), meter window (30s), and peer discovery methods
(k8s/bootstrap).
Signed-off-by: Sienna Meridian Satterwhite <sienna@sunbeam.pt>
2026-03-10 23:38:20 +00:00
|
|
|
|
2026-03-10 23:38:20 +00:00
|
|
|
[dev-dependencies]
|
|
|
|
|
criterion = { version = "0.5", features = ["html_reports"] }
|
2026-03-10 23:38:20 +00:00
|
|
|
proptest = "1"
|
|
|
|
|
tempfile = "3"
|
2026-03-10 23:38:20 +00:00
|
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
|
name = "scanner_bench"
|
|
|
|
|
harness = false
|
|
|
|
|
|
2026-03-10 23:38:21 +00:00
|
|
|
[[bench]]
|
|
|
|
|
name = "ddos_bench"
|
|
|
|
|
harness = false
|
|
|
|
|
|
2026-03-10 23:38:19 +00:00
|
|
|
[profile.release]
|
|
|
|
|
opt-level = 3
|
|
|
|
|
lto = true
|
|
|
|
|
codegen-units = 1
|
|
|
|
|
strip = true
|