lazydns is a lightweight, plugin-driven DNS server(smartdns/ dns-relay) designed for flexibility and performance. It supports multiple listener types (UDP, TCP, DoH, DoT, DoQ), a composable plugin pipeline, and extensible dataset formats (domain sets, IP sets, geosite). lazydns is suitable for local resolvers, DNS forwarding with caching, and policy-based filtering.
The following ASCII diagram shows the main request flow and components in lazydns:
Client(s)
|
v
+-----------------------------------------+
| Listeners (UDP/TCP/DoH/DoT/DoQ) |
+-----------------------------------------+
|
v
+-----------------------------------------+
| Request Handler / Dispatcher |
+-----------------------------------------+
|
v
+-----------------------------------------+
| Plugin Pipeline (ordered) |
| - query plugins (inspect/modify/resp) |
| - flow plugins (control execution) |
| - exec plugins (side effects / tasks)|
+-----------------------------------------+
|
v
+----------------+ +--------------------+
| Upstreams |<---| Datasets / Caches |
| (remote DNS) | | (domain/ip/geo) |
+----------------+ +--------------------+
|
v
Response -> Client(s)