Files
EasyDNS/CHANGELOG.md
T
2026-11-23 09:31:05 +01:00

118 lines
13 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Changelog
All notable changes follow [Keep a Changelog](https://keepachangelog.com/) and SemVer.
## [0.1.2] – 2026-11-23
### Changed
- **Zone data layout**: `data/zones/` is split by owner – `zones/primary/` (your zone files; default of `easydns zone create` and of zones created through the API), `zones/secondary/` (transferred copies, as before) and `zones/signed/` (DNSSEC, was `data/signed/`). Signed zones are moved automatically on the first start, so signatures are reused. Existing primary zones keep working from their current `file:` path; moving them is optional (commands in `docs/deployment.md`).
- Example configurations, `dev.sh`, the container (`compose.yaml` mounts `./zones/primary`) and the packages use the installed layout; sample zone files moved to `zones/primary/` in the repository, `config/hybrid.yaml` no longer uses `../` paths.
- Sample zone definitions in `config/zones.d/` are named after the zone (`example.org.yaml`), the same as `easydns zone create` writes them.
- systemd unit: removed `StateDirectory=easydns` – it created an unused, empty `/var/lib/easydns` (data lives in `/etc/easydns/data`).
### Added
- **Hosts files** (`hosts:`), like dnsmasq: names from `/etc/hosts`-format files (`hosts.files`, globs allowed) are answered before local zones, block lists, forwarding and recursion – A/AAAA for every name and alias, PTR for the address (first name), NODATA for other types so the name never leaves the host. Only for clients in `recursion.allowed_clients`. `hosts.domain` also answers bare names as `<name>.<domain>` (`expand-hosts`), `hosts.ttl` sets the TTL (default 0, like `local-ttl`), and changed files are re-read every `hosts.reload_interval` (default 5 s) without a reload. Missing files are a `check-config` warning and are read once they appear. Guide with a dnsmasq translation table: `docs/hosts.md`.
## [0.1.1] – 2026-11-22
First public release. Packages (DEB, RPM for RHEL, RPM for SUSE; amd64) are published on
https://repo.linuxiarz.pl; source: https://git.linuxiarz.pl/gru/EasyDNS.
### Changed
- **Defaults**: hybrid mode listening on `0.0.0.0:53` and `[::1]:53`; recursion allowed for `192.168.0.0/16`, `10.0.0.0/8`, `127.0.0.1/32`, `::1/128`; the installed `/etc/easydns/config.yaml` is a ready hybrid node (previous example moved to `config/hybrid.yaml`).
- **Data directory** of packages, systemd unit and container: `/etc/easydns/data` (was `/var/lib/easydns`). Purging the package no longer deletes it.
- **Zone `file:` paths are relative to `data_dir`** (`file: zones/example.com.zone` → `/etc/easydns/data/zones/example.com.zone`); old configs with paths relative to the config directory still load. Secondary copies default to `<data_dir>/zones/secondary/`.
- **TSIG keys are optional everywhere**: examples, docs and `zone create` use IP ACLs; `check-config` no longer warns about secondaries without TSIG or update keys without an ACL.
- **API** default listener `127.0.0.1:9953` (was 8080). The server creates a local admin token (`<data_dir>/control.token`, 0640) that the CLI reads automatically – no key to generate or pass locally (`api.local_token`).
- DoH server rewritten on hyper: **HTTP/2** and HTTP/1.1 (ALPN), h2c behind a proxy, 100 streams per connection, body size/time limits.
- `[::]` listeners are IPv6-only (as in BIND), so `0.0.0.0:53` and `[::]:53` can be configured together; TCP listeners use SO_REUSEADDR.
- The server CLI is now `easydns` (short alias `edns`) instead of `mydns`.
- UDP: N sockets per listen address with SO_REUSEPORT (`server.udp_sockets`, default one per CPU, max 16), each with its own receive loop; `server.max_inflight` is now one server-wide limit. Socket buffers of 1 MiB are requested.
- Cache split into 16 independently locked shards; records are copied outside the lock.
- Rate limiter: client buckets in 16 shards, lock-free global limit (GCRA).
- **Default `rate_limit.global_qps` is now 0 (no server-wide cap)**; it was 100 000, which limited every server to 100 k QPS. Set it explicitly to keep a cap.
- Reload reports `server.udp_sockets`/`max_inflight` changes as requiring a restart.
### Added
- **Encoded-answer cache** (`cache.answer_entries`, default 20 000; `cache.answer_max_age`): repeated queries are answered by copying stored response bytes (ID, question case and TTLs patched); UDP hits are served inline in the receive loop. Key includes the client profile (view, recursion ACL, block-list exemption, client-specific forward rules, transport); TSIG queries are never cached; zone changes, expiry, reloads and cache flushes invalidate it immediately. Measured: 2.2× less server CPU per query for repeated names and for cached forwarder answers, 1.65× for a realistic authoritative mix. Metrics `dns_answer_cache_*`.
- Batched UDP receive/send on Linux (`recvmmsg`/`sendmmsg`, 32 packets per call) through `nix`'s safe wrappers; other systems keep one call per packet.
- Resolver **prefetch** (`cache.prefetch`, default on): popular entries are refreshed in the background shortly before expiry (recursion and forwarding); metric `dns_cache_prefetches_total`.
- `scripts/bench-vs-bind.sh`: EasyDNS vs BIND on the same machine and cores with dnsperf (zone, query mix and report generated).
- `easydns zone create` (alias of `zones create`): minimal valid zone (SOA, NS, glue, apex addresses) in `<data_dir>/zones/` plus its `zones.d/` definition; `--allow-transfer`, `--notify`, `--allow-update`, `--dry-run`, `--reload`.
- RFC 2136 without keys: `update_acl` (alias `allow_update`) alone authorises updates by source address (BIND `allow-update { IPs; }`).
- `update_policy`: BIND `update-policy` rules (`grant|deny <key> name|subdomain|wildcard|zonesub|self|selfsub [name] [types]`), as strings or mappings; first match decides.
- BIND key files (`key "…" { algorithm …; secret "…"; };`) can be included unchanged; default config includes `keys.d/*.conf`.
- Persistent encrypted upstreams: DoT connection pool and multiplexed HTTP/2 DoH client (HTTP/1.1 fallback); `upstreams.tls_ca_file` for private CAs.
- TLS certificates (DoT/DoH) are re-read within 60 s after the files change; a broken pair is rejected and the old one kept.
- `edoh --http2`.
- Docs: step-by-step DNSSEC guide (key, signing, checks, DS/DNSKEY for the registrar, verification, rollover, safe disabling) in `docs/dnssec.md`; DNSSEC keys kept under `/etc/easydns/data/keys/`.
- Docs: `docs/secure-dns.md` (DoT/DoH server and secure forwarder), RFC 2136 section with a BIND translation in `docs/primary.md`, default installation layout.
- Tests: update policy + BIND key file + IP-only updates, BIND key parser, update rule parser, zone create, DoH HTTP/2 with 50 concurrent queries, DoT pool reuse, secure forwarder over DoT and DoH, certificate reload.
- Coalescing of identical in-flight resolutions (forwarder and recursion): concurrent cache misses for the same question share one upstream query.
- Tests: socket group, coalescing (burst of 40 → 1 upstream query, cancelled leader), cache sharding and concurrency, rate limiter bounds.
- `.gitignore` covering build output, packages, runtime state, secrets, editors and OS files.
- `include:` in the configuration: zone definitions, keys, ACLs and forward zones in separate files (`zones.d/*.yaml`).
- Docs: zone transfer variants (with/without TSIG), operations guide (master, name resolution), performance estimates vs BIND.
- `scripts/build-deb.sh` + `deploy/docker/Dockerfile.deb`: .deb packages built in Docker into `dist/`.
- `dev.sh`: developer runner (dev node, secondary, DNSSEC variant, queries, API, checks, e2e).
- `docs/migration-from-bind.md`, `docs/spec-gaps.md`.
### Fixed
- Upgrades: secondary zone copies kept by older versions in `<data_dir>/secondary/` are moved to `<data_dir>/zones/secondary/` on start, so `file: null` secondaries keep serving from their local copy instead of transferring again.
- Package upgrade restarts a running server only after the new version accepted the configuration (checked as the `easydns` user); previously the old binary kept running until a manual restart.
- Zone `file:` paths with `..` relative to `data_dir` failed while the data directory did not exist yet; paths are now normalised lexically.
- `easydns dnssec keygen`: key directory created 0700 and key file created 0600 from the start (it was briefly readable before `chmod`); when run as root both are owned by the data directory's owner (`easydns`), so the service can read the key.
- One-shot commands and tools no longer panic when their output pipe is closed early (`easydns … | head`); they exit with status 141 like classic Unix tools.
- DoT listener: TCP_NODELAY was not set, so every new DoT connection waited ~40 ms on delayed ACKs during the TLS handshake (measured 44 ms → 0.5 ms).
- DoH: a request announcing an oversized body could keep the connection waiting; it is now rejected at once (413) and the connection closed.
- `0.0.0.0:53` together with `[::]:53` failed with "address in use" on Linux.
- Zone files: a `$TTL` directive in the middle of a file was ignored for following records that had no TTL of their own (they kept the previous record's TTL). Files written by BIND (`rndc sync`, `named-compilezone`) change `$TTL` per block, so migrated zones could be served with wrong TTLs. Records now get the `$TTL` in force at their line (RFC 2308), or the last explicit TTL when the file has no `$TTL`.
- Zone files written after a dynamic update or an API change lost the quoting of TXT and HINFO data (`v=spf1 … -all` became separate strings, DKIM keys were split), and SVCB/HTTPS records got a trailing comma. Character strings are now always quoted and escaped; written files are re-read in tests for every record type.
- A bare `@` in record data (`www CNAME @`, `MX 10 @`) was rejected; it now means the current origin, as in BIND.
### Packaging
- Built and signed by repo.linuxiarz.pl for Debian/Ubuntu, RHEL/Alma/Rocky and SUSE: `/usr/bin/easydns` + the EasyDNS Tools, `easydns.service`, block list timer, `/etc/easydns/{config.yaml,root.hints}` as configuration files, examples in `/usr/share/doc/easydns/examples/`. The service is not started on install (port 53 is often in use); on upgrade a running server is restarted only after the new version accepts its configuration.
## [0.1.0] – 2026-11-21
Internal preview, not published.
### Added
- Workspace with crates `dns-core`, `dns-config`, `dns-authoritative`, `dns-recursive`,
`dns-forwarder`, `dns-cache`, `dns-policy`, `dns-server`, `dns-api`, `dns-metrics`,
`dns-cli` (`easydns`) and `dns-tools`.
- Primary: BIND zone files, wildcard (RFC 4592), delegations and glue, empty non-terminals,
CNAME chains, AXFR, IXFR with persistent journal and AXFR-style fallback, NOTIFY with
retries, TSIG (RFC 8945, multi-message), transfer ACLs, RFC 2136 dynamic updates with
TSIG + ACL and audit log, atomic zone publication, serial strategies (increment/unixtime/date).
- Secondary: initial AXFR, IXFR with AXFR fallback, NOTIFY handling with ACL/TSIG, SOA
REFRESH/RETRY/EXPIRE timers, RFC 1982 serial arithmetic, persistent snapshot with atomic
replace, restart recovery, SERVFAIL after EXPIRE, transfer history.
- Recursive resolver: iterative resolution from root hints, bailiwick filtering, glueless
delegations, QNAME minimisation with fallback, budgets (queries, depth, CNAME chain,
deadline), server RTT tracking/back-off, RFC 2308 negative caching, serve-stale (opt-in).
- DNSSEC: online signing of primary zones (NSEC chain, Ed25519/ECDSA P-256/P-384, KSK/ZSK/CSK,
automatic re-signing, persisted signed zone), validating resolver (chain of trust from the
IANA root KSKs or configured anchors, NSEC and NSEC3 denial proofs, CD bit, AD bit).
- Forwarder: pools with round-robin/fastest/failover/random/priority, circuit breaker,
health checks, UDP/TCP/DoT/DoH upstreams, conditional forwarding per domain/client.
- Hybrid routing with per-route cache namespaces, split-horizon views, local-only names
(RFC 6761/6303), block/allow lists (exact, suffix, wildcard, bounded regex, hosts format).
- DoT and DoH (GET/POST) listeners; per-client and global rate limiting with RRL-style slip.
- REST API `/api/v1` with bearer tokens (admin/read-only), ETag/If-Match, pagination,
audit trail, OpenAPI document; `/metrics` in Prometheus format; hot reload with rollback
(SIGHUP or API); configuration precedence CLI > ENV > file > defaults.
- Tools: ed/easydig, eh/easyhost, ens/easynslookup, etrace, ednssec, eptr, ezone, econf,
ebench, ewhois, edoh, edot, ediff; shell completions and man page for `easydns`.
- Zone file pre-processor for DNSKEY/RRSIG/NSEC/NSEC3/NSEC3PARAM and RFC 3597 generic types.
- Deployment: Dockerfile, compose, hardened systemd unit, nfpm (.deb/.rpm) packaging,
install script with name-collision checks, CI workflow (fmt, clippy, tests, ARM64, musl,
macOS/Windows tools, cargo-deny), fuzz targets and a stable robustness test.