RepositoryRustRORomania
razvandimescu

razvandimescu/numa

Portable DNS resolver in Rust: .numa local domains, ad blocking, developer overrides, DoT/DoH/ODoH and DNSSEC

2.0ksao
145fork
16issue
2lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: ad-blocking

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: service-discovery

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: tokio

#1 Repository của tuần

Numa

CI crates.io License: MIT

DNS you own. Everywhere you go. — numa.rs

A portable DNS resolver in a single binary. Block ads on any network, name your local services (frontend.numa), override any hostname with auto-revert, and seal every outbound query with ODoH (RFC 9230) so no single party sees both who you are and what you asked — all from your laptop, no cloud account or Raspberry Pi required.

Built from scratch in Rust. Zero DNS libraries. Caching, ad blocking, and local service domains out of the box. Optional recursive resolution from root nameservers with full DNSSEC chain-of-trust validation, plus a DNS-over-TLS listener for encrypted client connections (iOS Private DNS, systemd-resolved, etc.). Run numa relay and the same binary becomes a public ODoH endpoint too — the curated DNSCrypt list currently has one surviving relay, so every Numa deploy materially expands the ecosystem. One ~8MB binary, everything embedded.

Numa dashboard

Quick Start

# macOS
brew install razvandimescu/tap/numa

# Linux
curl -fsSL https://raw.githubusercontent.com/razvandimescu/numa/main/install.sh | sh

# Arch Linux
pacman -S numa

# Windows — download from GitHub Releases
# All platforms
cargo install numa

# Docker
docker run -d --name numa --network host ghcr.io/razvandimescu/numa

# Nix
nix run github:razvandimescu/numa
sudo numa                              # run in foreground (port 53 requires root/admin)

Open the dashboard: http://numa.numa (or http://localhost:5380)

Set as system DNS:

PlatformInstallUninstall
macOSsudo numa installsudo numa uninstall
Linuxsudo numa installsudo numa uninstall
Windowsnuma install (admin) + rebootnuma uninstall (admin) + reboot

On macOS and Linux, numa runs as a system service (launchd/systemd). On Windows, numa auto-starts on login via registry. Windows also binds 127.0.0.2:53 (the built-in Dnscache owns 127.0.0.1:53) and installs an NRPT rule to route queries to it — so edit bind_addr/api_bind_addr against 127.0.0.2, not 127.0.0.1.

Local Services

Name your dev services instead of remembering port numbers:

curl -X POST localhost:5380/services \
  -d '{"name":"frontend","target_port":5173}'

Now https://frontend.numa works in your browser — green lock, valid cert, WebSocket passthrough for HMR. No mkcert, no nginx, no /etc/hosts.

Add path-based routing (app.numa/api → :5001), share services across machines via LAN discovery, or configure everything in numa.toml.

Ad Blocking & Privacy

385K+ domains blocked via Hagezi Pro. Works on any network — coffee shops, hotels, airports. Travels with your laptop.

Three resolution modes:

  • forward (default) — transparent proxy to your existing system DNS. Everything works as before, just with caching and ad blocking on top. Captive portals, VPNs, corporate DNS — all respected.
  • recursive — resolve directly from root nameservers. No upstream dependency, no single entity sees your full query pattern. Add [dnssec] enabled = true for full chain-of-trust validation.
  • auto — probe root servers on startup, recursive if reachable, encrypted DoH fallback if blocked.

DNSSEC validates the full chain of trust: RRSIG signatures, DNSKEY verification, DS delegation, NSEC/NSEC3 denial proofs. Read how it works →

DNS-over-TLS listener (RFC 7858) — accept encrypted queries on port 853 from strict clients like iOS Private DNS, systemd-resolved, or stubby. Two modes:

  • Self-signed (default) — numa generates a local CA automatically. numa install adds it to the system trust store on macOS, Linux (Debian/Ubuntu, Fedora/RHEL/SUSE, Arch), and Windows. On iOS, install the .mobileconfig from numa setup-phone. Firefox keeps its own NSS store and ignores the system one — trust the CA there manually if you need HTTPS for .numa services in Firefox.
  • Bring-your-own cert — point [dot] cert_path / key_path at a publicly-trusted cert (e.g., Let's Encrypt via DNS-01 challenge on a domain pointing at your numa instance). Clients connect without any trust-store setup — same UX as AdGuard Home or Cloudflare 1.1.1.1.

ALPN "dot" is advertised and enforced in both modes; a handshake with mismatched ALPN is rejected as a cross-protocol confusion defense.

Phone setup — point your iPhone or Android at Numa in one step:

numa setup-phone

Prints a QR code. Scan it, install the profile, toggle certificate trust — your phone's DNS now routes through Numa over TLS. Requires [mobile] enabled = true in numa.toml.

LAN Discovery

Run Numa on multiple machines. They find each other automatically via mDNS:

Machine A (192.168.1.5)              Machine B (192.168.1.20)
┌──────────────────────┐             ┌──────────────────────┐
│ Numa                 │    mDNS     │ Numa                 │
│  - api (port 8000)   │◄───────────►│  - grafana (3000)    │
│  - frontend (5173)   │  discovery  │                      │
└──────────────────────┘             └──────────────────────┘

From Machine B: curl http://api.numa → proxied to Machine A's port 8000. Enable with numa lan on.

Hub mode: run one instance with bind_addr = "0.0.0.0:53" and point other devices' DNS to it — they get ad blocking + .numa resolution without installing anything. bind_addr also accepts a list to bind a specific subset of interfaces.

Docker

# Recommended — host networking (Linux)
docker run -d --name numa --network host ghcr.io/razvandimescu/numa

# Port mapping (macOS/Windows Docker Desktop)
docker run -d --name numa -p 53:53/udp -p 53:53/tcp -p 5380:5380 ghcr.io/razvandimescu/numa

Dashboard at http://localhost:5380. The image binds the API and proxy to 0.0.0.0 by default. Override with a custom config:

docker run -d --name numa --network host \
  -v /path/to/numa.toml:/root/.config/numa/numa.toml \
  ghcr.io/razvandimescu/numa

Multi-arch: linux/amd64 and linux/arm64.

Turnkey compose recipes:

How It Compares

Pi-holeAdGuard HomeUnboundNuma
Local service proxy + auto TLS———.numa domains, HTTPS, WebSocket
LAN service discovery———mDNS, zero config
Developer overrides (REST API)———Auto-revert, scriptable
Recursive resolver——YesYes, with SRTT selection
DNSSEC validation——YesYes (RSA, ECDSA, Ed25519)
Ad blockingYesYes—385K+ domains
Web admin UIFullFull—Dashboard
Encrypted upstream (DoH/DoT)Needs cloudflaredDoH onlyDoT onlyDoH + DoT (tls://)
Encrypted clients (DoT listener)Needs stunnel sidecarYesYesNative (RFC 7858)
DoH server endpoint—Yes—Yes (RFC 8484)
Request hedging———All protocols (UDP, DoH, DoT)
Serve-stale + prefetch——Prefetch at 90% TTLRFC 8767, prefetch at 90% TTL
Conditional forwarding—YesYesYes (per-suffix rules)
Portable (laptop)No (appliance)No (appliance)ServerSingle binary, macOS/Linux/Windows
Community maturity56K stars, 10 years33K stars20 yearsNew

Performance

0.1ms cached queries — matches Unbound and AdGuard Home. Wire-level cache stores raw bytes with in-place TTL patching. Request hedging eliminates p99 spikes: cold recursive p99 538ms vs Unbound 748ms (−28%), σ 4× tighter. Benchmarks →

Learn More

Roadmap

  • DNS forwarding, caching, ad blocking, developer overrides
  • .numa local domains — auto TLS, path routing, WebSocket proxy
  • LAN service discovery — mDNS, cross-machine DNS + proxy
  • DNS-over-HTTPS — encrypted upstream + server endpoint (RFC 8484)
  • DNS-over-TLS — encrypted client listener (RFC 7858) + upstream forwarding (tls://)
  • Oblivious DoH — anonymized client mode + public relay (numa relay, RFC 9230)
  • Recursive resolution + DNSSEC — chain-of-trust, NSEC/NSEC3
  • SRTT-based nameserver selection
  • Multi-forwarder failover — multiple upstreams with SRTT ranking, fallback pool
  • Request hedging — parallel requests rescue packet loss and tail latency (all protocols)
  • Serve-stale + prefetch — RFC 8767, background refresh at <10% TTL and on stale serve
  • Conditional forwarding — per-suffix rules for split-horizon DNS (Tailscale, VPNs)
  • Cache warming — proactive resolution for configured domains
  • Mobile onboarding — setup-phone QR flow, mobile API, mobileconfig profiles
  • pkarr integration — self-sovereign DNS via Mainline DHT
  • Global .numa names — DHT-backed, no registrar

License

MIT

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryMarkdown
DigitalPlatDev/FreeDomain

Free domain registration and practical DNS learning resources for everyone.

210.0k
Aug 12, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
156.6M
Jun 1, 2026
RepositoryRust
codewhale-hq/Codewhale

Open-source Rust coding agent for terminal, web, and desktop. Any model, multi-agent fleets, MCP & plugins, OS sandboxing, and session receipts.

41.2k
Dec 3, 2026
RepositoryRust
lapce/lapce

Lightning-fast and Powerful Code Editor written in Rust

39.1k
Nov 27, 2026
RepositoryRust
hickory-dns/hickory-dns

A Rust based DNS client, server, and resolver

5.5k
Dec 1, 2026
RepositoryRust
farion1231/cc-switch

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

159.0k
Dec 3, 2026
RepositoryGo
coredns/coredns

CoreDNS is a DNS server that chains plugins

14.5k
Nov 27, 2026
RepositoryC
pymumu/smartdns

A local DNS server to obtain the fastest website IP for the best Internet experience, support DoT, DoH, DoQ. 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验,支持DoH,DoT,DoQ。

11.5k
Nov 25, 2026
RepositoryC#
TechnitiumSoftware/DnsServer

Technitium DNS Server

10.5k
Nov 23, 2026