Multi‑protocol DNS resolver with full server and config support
Project description
dosev – Multi‑Protocol DNS Resolver & Server
dosev is a high‑performance, asynchronous DNS resolver and forwarding server that speaks all major DNS protocols – both as a client and as a server.
- Client protocols: DNS over UDP, TCP, TLS (DoT), HTTPS (DoH – HTTP/1.1, HTTP/2, HTTP/3), and QUIC (DoQ).
- Server protocols: UDP, TCP, TLS (DoT), HTTPS (DoH – HTTP/2 and HTTP/3).
- Features: EDNS0 (including Client Subnet), DNSSEC validation with automatic trust anchor updates, negative caching, optimistic caching (serve‑stale), blocklists, hosts overrides, upstream health checks, load balancing, Prometheus metrics, and more.
🚀 Quick Start
# Install via pip
pip install dosev
# Create a minimal config file
mkdir -p config
cat > config/dosev.conf <<EOF
[server]
listen_ip = 0.0.0.0
listen_port = 53
[resolver]
upstream_dns = 1.1.1.1
protocol = udp
EOF
# Start the server
dosev --config config/dosev.conf
For detailed instructions, see the Quick Start Guide.
✨ Features
| Feature | Description |
|---|---|
| Multi‑protocol client | Forward queries via UDP, TCP, TLS, HTTPS (HTTP/1.1, HTTP/2, HTTP/3), and QUIC. |
| Multi‑protocol server | Listen on UDP, TCP, TLS, and HTTPS (HTTP/2 & HTTP/3). |
| DNSSEC validation | Validate responses with a built‑in root trust anchor (auto‑updated from IANA). |
| Caching | Positive and negative caching with configurable TTLs; optimistic caching (serve‑stale). |
| Blocklists | Filter domains using local files or remote lists (automatically refreshed). |
| Hosts overrides | Custom A/AAAA records for local name resolution. |
| EDNS0 & Client Subnet | Pass client subnet to upstreams for geo‑optimised responses. |
| Load balancing & health checks | Distribute queries across multiple upstreams; automatically exclude unhealthy ones. |
| Rate limiting | Token‑bucket limiter per client IP. |
| Rebinding protection | Strip or block private IP addresses from responses. |
| Metrics | Prometheus‑compatible metrics (requests, errors, latency, cache stats). |
| Privilege dropping | Drop root privileges after binding to privileged ports. |
| Cross‑platform | Works on Linux, macOS, and Windows. |
| Configuration | Single INI file; can be reloaded without restarting. |
📖 Documentation
- Quick Start – get up and running in minutes.
- Configuration Reference – all available options explained.
- Deployment Guide – systemd, Docker, and production tuning.
- Contributing – how to help improve dosev.
🔧 Configuration Example
[server]
listen_ip = 0.0.0.0
listen_port = 53
[resolver]
upstream_dns = 1.1.1.1
protocol = udp
[security]
dnssec_enabled = true
auto_update_trust_anchor = true
[blocklists]
enabled = true
urls = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
action = NXDOMAIN
See the full configuration reference for all options.
🧪 Running Tests
pip install dosev[test]
pytest --cov=dosev --cov-report=term-missing
🤝 Contributing
We welcome contributions! Please read our Contributing Guide before opening issues or pull requests.
📄 License
This project is licensed under the MIT License – see the LICENSE file for details.
🙏 Acknowledgements
- dnspython – for DNS message handling.
- aiohttp – for HTTP/1.1 and HTTP/2 support.
- aioquic – for HTTP/3 and QUIC support.
- Prometheus – for metrics.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dosev-1.2.0.tar.gz.
File metadata
- Download URL: dosev-1.2.0.tar.gz
- Upload date:
- Size: 49.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d120395b452b2fc42289d91727acf17217c9227419a501255c71f15092665902
|
|
| MD5 |
eb963c9b3205c5cfd7f327579b9baa00
|
|
| BLAKE2b-256 |
61223f3db5ffdd2fba6617a701897d5bd0848d0ce83dd673fa536f20aece86b9
|
File details
Details for the file dosev-1.2.0-py3-none-any.whl.
File metadata
- Download URL: dosev-1.2.0-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dd65bdbbd89aab9836638e6f19c26dc2395284fd60e80a40149c42de329dc04
|
|
| MD5 |
2d09d2e24ed479a3c8917b5764c355c5
|
|
| BLAKE2b-256 |
8f195473e0095fe98578420b289f2a6279cc3b62709d140e7f719f7c9552f4fc
|