How trinib/adguard-wireguard-unbound-dnscrypt works
Main Components
• AdGuard Home – This is the front-end DNS server that performs ad blocking and filtering. It accepts DNS queries from your local clients.
• Unbound – This component acts as the recursive resolver. It serves as a caching layer and handles the deeper DNS resolution logic.
• DNScrypt Proxy – This provides secure (encrypted) DNS queries to upstream resolvers. Although the full project includes options for Cloudflare tunnels or Stubby, your goal is to use DNScrypt.
Data Flow and Relationships
• Clients (desktops, mobile devices, etc.) send their DNS queries to the AdGuard Home server (typically running on 127.0.0.1 or the Pi’s IP, on standard DNS ports like 53).
• AdGuard Home processes and filters the query before forwarding it to the Unbound resolver.
• Unbound receives the request, performs caching/recursive resolution, and then—rather than directly querying the internet—it forwards these queries to the DNScrypt Proxy.
• The DNScrypt Proxy encrypts the DNS requests before they leave your network, ensuring that the eventual remote DNS provider sees encrypted traffic. The responses follow the reverse path back through Unbound and then AdGuard Home to the client.
Architectural Patterns & Design Principles
• Separation of concerns is clear: AdGuard Home is responsible for filtering and interface exposure, Unbound for recursive resolution and caching, and DNScrypt for encryption of upstream queries.
• The design forms a clear chain of responsibility—each component processes the query and passes it along until the response is delivered.
– A rounded rectangle for AdGuard Home,
– A standard rectangle for Unbound,