[package]
name = "rolodex-dns"
version = "0.2.3"
edition = "2024"
authors = ["Erik Hollensbe <git@hollensbe.org>"]
description = "A split-horizon DNS server and forwarding resolver with gRPC management"
license = "AGPL-3.0-only"
repository = "https://gitea.com/town-os/rolodex-dns"
keywords = ["dns", "dns-server", "split-horizon", "grpc", "forwarding-resolver"]
categories = ["network-programming"]

[dependencies]
# DNS
domain = { version = "0.11", features = ["std", "bytes", "resolv"] }
hickory-resolver = { version = "0.25", features = ["system-config", "tokio"] }
hickory-proto = "0.25"

# gRPC
tonic = "0.14"
tonic-prost = "0.14"
prost = "0.14"
prost-types = "0.14"
async-trait = "0.1"

# Async runtime
tokio = { version = "1", features = ["full"] }
tokio-stream = { version = "0.1", features = ["net"] }

# Database
rusqlite = { version = "0.35", features = ["bundled"] }

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml_ng = "0.10"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Duration parsing
fancy-duration = "0.9"

# Utilities
dashmap = "6"
arc-swap = "1"
clap = { version = "4", features = ["derive"] }
anyhow = "1"
thiserror = "2"
rand = "0.9"
nix = { version = "0.29", features = ["net"] }
sha2 = "0.10"
hex = "0.4"
bytes = "1"
hyper-util = "0.1"
tower = "0.5"

# TLS
rustls = "0.23"
tokio-rustls = "0.26"
rustls-pemfile = "2"
rcgen = { version = "0.13", features = ["x509-parser"] }
x509-parser = "0.16"
time = { version = "0.3", features = ["formatting"] }

# DoH
axum = { version = "0.8", features = ["http2"] }
axum-server = { version = "0.7", features = ["tls-rustls"] }
base64 = "0.22"

# DoQ
quinn = "0.11"

# DNSSEC
ring = "0.17"

# DHCP
dhcproto = "0.14"

[build-dependencies]
tonic-build = "0.14"
tonic-prost-build = "0.14"
prost-build = "0.14"

[[bin]]
name = "rolodex-dns"
path = "src/main.rs"

[[bin]]
name = "rolodex-dns-cli"
path = "src/bin/rolodex-dns-cli.rs"

[dev-dependencies]
rustls-webpki = { version = "0.103", features = ["ring", "std"] }
tower = { version = "0.5", features = ["util"] }
tempfile = "3"
tokio-test = "0.4"
mockall = "0.13"
assert_cmd = "2"
predicates = "3"
criterion = { version = "0.5", features = ["html_reports"] }

[[bench]]
name = "dns_perf"
harness = false
