Resolve PTR names over DNS-over-HTTPS and cache them for the record TTL (closes #238)
check / check (push) Successful in 1m58s
check / check (push) Successful in 1m58s
`internal/ptr` asks Google, Cloudflare, AdGuard and Quad9 in turn, 2 seconds in all per address. It keeps answers in memory and writes them through to `cache.db`, opened by the new `internal/cachedb`. A reserved address is not sent to the resolvers. The cache holds at most 250,000 addresses. Judgement calls: - Each resolver gets an equal share of the time left, so a hung resolver does not use up the 2 seconds. - The negative TTL is the smaller of the SOA minimum and the SOA's own TTL (RFC 2308). - Names that are not host names are dropped, as `net.Resolver.LookupAddr` does. Model: opus-5-5
This commit is contained in:
1 parent
641798bb22
commit
848271b5c8
21 files changed
+1973
-69
No files matched your search
@@ -0,0 +1,8 @@
|
||||
-- hostnames holds the PTR names of addresses. names has the names separated by
|
||||
-- spaces, and is empty for an address with no PTR names. expires_at is in
|
||||
-- seconds since 1970.
|
||||
CREATE TABLE IF NOT EXISTS hostnames (
|
||||
address TEXT PRIMARY KEY,
|
||||
names TEXT NOT NULL,
|
||||
expires_at INTEGER NOT NULL
|
||||
);
|
||||
Reference in new issue
Block a user