Document caching, negative responses, and add CLAUDE.md
README was missing the continuous-caching and RFC 2308 negative response behavior added in recent commits. CLAUDE.md is new, providing architecture guidance for future Claude Code sessions.
This commit is contained in:
@@ -2,6 +2,8 @@ This is a **Discovery Proxy for Multicast DNS-Based Service Discovery**, written
|
||||
|
||||
Both IPv4 and IPv6 are supported on the mDNS side. For IPv6, only Unique Local Addresses (ULA, `fc00::/7`) are published in `AAAA` records: link-local addresses aren't usable by unicast DNS clients (DNS has no way to express the required zone index), and globally routable addresses are filtered out so that only internal ULA addresses are advertised.
|
||||
|
||||
Rather than issuing a one-shot mDNS query and blocking for a timeout on every lookup, the proxy keeps a live mDNS cache warm in the background: browsing and previously-seen names/services are re-queried periodically, so most unicast DNS queries are answered straight from cache with a TTL that reflects the underlying record's real remaining lifetime. Negative responses (e.g. a name or service that doesn't exist) are returned per [RFC 2308](https://tools.ietf.org/html/rfc2308), with a synthesized SOA record in the authority section so resolvers can negative-cache them too.
|
||||
|
||||
This kind of proxy is specified by [RFC 8766](https://tools.ietf.org/html/rfc8766). I did not actually follow the standard in implementing it, which means that it doesn't abide by many of the finer details. Nevertheless, it works fine with clients like macOS 10.15 and iOS 13. Any violations of the standard are to be considered bugs and should be fixed over time.
|
||||
|
||||
Other implementations of discovery proxies are [ohybridproxy](https://github.com/sbyx/ohybridproxy) and [included with mDNSResponder](https://opensource.apple.com/source/mDNSResponder/mDNSResponder-1096.60.2/ServiceRegistration/dnssd-proxy.c.auto.html). Since the former only runs on OpenWRT and mDNSResponder is not readily available on Linux, I decided to put together my own implementation in Python. Its dependencies are pure Python, so it should be possible to run it pretty much anywhere.
|
||||
|
||||
Reference in New Issue
Block a user