Highlights
Query Rate Limiting
Added pkdns arguments to support rate limiting dns queries by IP address. This reduces the attack surface on the forward DNS and the DHT.
--query-rate-limit <query-rate-limit>
Maximum number of queries per second one IP address can make before it is rate limited. 0 is disabled. [default: 0]
--query-rate-limit-burst <query-rate-limit-burst>
Short term burst size of the query-rate-limit. 0 is disabled. [default: 0]
--dht-rate-limit <dht-rate-limit>
Maximum number of queries per second one IP address can make to the DHT before it is rate limited. 0 is disabled. [default: 5]
--dht-rate-limit-burst <dht-rate-limit-burst>
Short term burst size of the dht-rate-limit. 0 is disabled. [default: 25]
Queries to the DHT are now rate limited by default.
Simplified Publish Command
BREAKING: pkdns-cli publish
only publishes the pkarr.zone once. The parameter --once
has been removed. Use crontab to continuously publish the zone.
Improved TTL Caching
Pkarr zones are now cached dynamically depending on the configured TTL of the zone. Before, zones would only be cached for 60s. Use the new pkdns argument to configure min/max ttl values. Set the max to 0 for quick dev iterations.
--min-ttl <min-ttl>
Minimum number of seconds a value is cached for before being refreshed. [default: 60]
--max-ttl <max-ttl>
Maximum number of seconds before a cached value gets auto-refreshed. [default: 86400]
publickey command
Derive a public key from a seed with pkdns-cli publickey
.
Use $ttl variable in pkarr.zone
Use the $ttl
variable in the pkarr.zone to define cache times. You can also define ttls over individual records. Use the standard
dns zone format to set ttls.
Example:
$TTL 300
@ IN A 127.0.0.1
subdomain 86400 IN A 127.0.0.1
In this case, the default ttl is 300 (5min). subdomain has a custom ttl of 86400 (1 day).
Detailed Changes
-
BREAKING: simplify publish command by @SeverinAlexB in #54
-
feat: publickey cli command by @SeverinAlexB in #47
-
feat: use $ttl as a variable in the zonefile by @SeverinAlexB in #48
-
feat: Rate limiting by @SeverinAlexB in #42
-
feat: Improved TTL Caching by @SeverinAlexB in #34
-
fix: Deadlocks freezing the whole server after two DHT calls by @SeverinAlexB in #51
-
fix: disappearing pkd after cache expires by @SeverinAlexB in #50
-
fix: improved forward dns server error handling. Prevent panic by @SeverinAlexB in #43
-
fix: Delayed dht resolution when updating values by @SeverinAlexB in #44
-
fix: respect RUST_LOG in env + advanced logging doc by @SeverinAlexB in #31
-
chore: pkarr 2.2.1 by @SeverinAlexB in #53
-
chore: reduce default min-ttl to 60s by @SeverinAlexB in #45
-
chore: format code, remove warnings by @SeverinAlexB in #55
-
chore: Copy any-dns code into this project by @SeverinAlexB in #41
Full Changelog: v0.5.4...v0.6.0