Expand description
Bluebox - A fast DNS interceptor and cache.
Bluebox is a DNS server that intercepts DNS queries on the local network, caches responses, and blocks configured domains. It’s designed to be faster than your router’s DNS resolver.
§Architecture
The crate is organized into several modules:
config: Configuration loading and validationdns: DNS protocol handling, blocking, and resolutioncache: Response caching with TTL supportnetwork: Packet capture and constructionserver: Server orchestrationerror: Error types
§Testing
All components are designed with trait-based abstractions to enable comprehensive testing without network access:
use bluebox::dns::{Blocker, DnsResolver};
use bluebox::cache::DnsCache;
// Components can be tested with mock implementations
let blocker = Blocker::new(["*.ads.com"]);
assert!(blocker.is_blocked(&"tracking.ads.com".parse().unwrap()));Re-exports§
Modules§
- blocklist
- Blocklist format parsers.
- cache
- DNS response caching.
- config
- Configuration loading and validation.
- dns
- DNS-related modules.
- error
- Error types for the Bluebox DNS server.
- metrics
- Metrics initialization for Prometheus exporter.
- network
- Network-related modules for packet capture and construction.
- server
- DNS server orchestration.