# technitiumsoftware/dnsserver architecture

> Architecture diagram of the GitHub repository technitiumsoftware/dnsserver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/technitiumsoftware/dnsserver
- Repository: https://github.com/technitiumsoftware/dnsserver

## Overview

Technitium DNS Server is a self-hosted authoritative and recursive DNS server with a web administration console. The principal workflow is a DNS client query entering the server, which resolves it using authoritative zones or recursion and can apply installed DNS apps; the README also documents caching, DNSSEC, encrypted DNS transports, and blocking. Administrators use the web service for zones, users, logs, DHCP, and cluster management. The graph covers major documented capabilities, but unsampled modules are represented at directory level and their internal wiring is not inferred.

Main entry points: [`DnsServerCore/DnsWebService.cs`](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/DnsWebService.cs) (Web administration service), [`DnsServerCore/Dns/DnsServer.cs`](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/DnsServer.cs) (DNS server), [`DnsServerCore/Dns/Applications/DnsApplicationManager.cs`](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/Applications/DnsApplicationManager.cs) (DNS applications), [`DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs`](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs) (Authoritative zones)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dns["DNS Resolution"]
  node_dns_server["DNS server<br/>[DnsServer.cs]"]
  node_cache[("Resolver caches")]
  node_stats["DNS statistics<br/>[StatsManager.cs]"]
end

subgraph group_zones["Zones and Apps"]
  node_auth_zones[("Authoritative zones<br/>[AuthZoneManager.cs]")]
  node_zone_types["Zone implementations"]
  node_dns_apps["DNS applications"]
  node_blocking_app["Advanced blocking<br/>[App.cs]"]
  node_forwarding_app["Advanced forwarding<br/>[App.cs]"]
  node_dns64_app["DNS64<br/>[App.cs]"]
end

subgraph group_admin["Administration"]
  node_auth[("Authentication and roles<br/>[AuthManager.cs]")]
  node_web["Web administration service<br/>[DnsWebService.cs]"]
  node_web_apis["Web API routes<br/>[WebServiceApi.cs]"]
  node_web_ui["Web console<br/>[main.js]"]
  node_cluster["Cluster management<br/>[ClusterManager.cs]"]
  node_logs[("Query logging<br/>[LogManager.cs]")]
end

subgraph group_services["Network Services"]
  node_dhcp["DHCP server<br/>[DhcpServer.cs]"]
  node_log_export["Log export<br/>[ExportManager.cs]"]
  node_query_log_stores[("Query log stores<br/>[App.cs]")]
end

node_client(("DNS client"))
node_user(("Administrator"))

node_client -->|"queries"| node_dns_server
node_dns_server -->|"resolves zones"| node_auth_zones
node_dns_server -.->|"caches responses"| node_cache
node_dns_server -->|"queues statistics"| node_stats
node_dns_server -.->|"dispatches apps"| node_dns_apps
node_auth_zones -->|"manages zones"| node_zone_types
node_blocking_app -->|"implements app contract"| node_dns_apps
node_forwarding_app -->|"implements app contract"| node_dns_apps
node_dns64_app -->|"implements app contract"| node_dns_apps
node_user -->|"administers"| node_web_ui
node_web_ui -.->|"uses console service"| node_web
node_web -->|"routes requests"| node_web_apis
node_web -->|"uses authentication"| node_auth
node_web -->|"uses cluster manager"| node_cluster
node_web -->|"manages DHCP"| node_dhcp
node_web -->|"manages logs"| node_logs
node_cluster -->|"updates cluster zones"| node_auth_zones
node_log_export -.->|"exports log data"| node_query_log_stores

click node_dns_server "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/DnsServer.cs"
click node_cache "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/ResolverDnsCache.cs"
click node_stats "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/StatsManager.cs"
click node_auth_zones "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs"
click node_zone_types "https://github.com/technitiumsoftware/dnsserver/tree/master/DnsServerCore/Dns/Zones"
click node_dns_apps "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/Applications/DnsApplicationManager.cs"
click node_blocking_app "https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/AdvancedBlockingApp/App.cs"
click node_forwarding_app "https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/AdvancedForwardingApp/App.cs"
click node_dns64_app "https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/Dns64App/App.cs"
click node_auth "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Auth/AuthManager.cs"
click node_web "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/DnsWebService.cs"
click node_web_apis "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/WebServiceApi.cs"
click node_web_ui "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/www/js/main.js"
click node_cluster "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Cluster/ClusterManager.cs"
click node_logs "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/LogManager.cs"
click node_dhcp "https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dhcp/DhcpServer.cs"
click node_log_export "https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/LogExporterApp/Strategy/ExportManager.cs"
click node_query_log_stores "https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/QueryLogsSqliteApp/App.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dns_server,node_cache,node_stats,node_client toneBlue
class node_auth_zones,node_zone_types,node_dns_apps,node_blocking_app,node_forwarding_app,node_dns64_app toneAmber
class node_auth,node_web,node_web_apis,node_web_ui,node_cluster,node_logs toneMint
class node_dhcp,node_log_export,node_query_log_stores toneRose
class node_user toneIndigo
```

## Components

### DNS Resolution

- [DNS server](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/DnsServer.cs): `DnsServerCore/Dns/DnsServer.cs`
- [Resolver caches](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/ResolverDnsCache.cs): `DnsServerCore/Dns/ResolverDnsCache.cs`
- [DNS statistics](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/StatsManager.cs): `DnsServerCore/Dns/StatsManager.cs`

### Zones and Apps

- [Authoritative zones](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs): `DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs`
- [Zone implementations](https://github.com/technitiumsoftware/dnsserver/tree/master/DnsServerCore/Dns/Zones): `DnsServerCore/Dns/Zones`
- [DNS applications](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dns/Applications/DnsApplicationManager.cs): `DnsServerCore/Dns/Applications/DnsApplicationManager.cs`
- [Advanced blocking](https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/AdvancedBlockingApp/App.cs): `Apps/AdvancedBlockingApp/App.cs`
- [Advanced forwarding](https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/AdvancedForwardingApp/App.cs): `Apps/AdvancedForwardingApp/App.cs`
- [DNS64](https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/Dns64App/App.cs): `Apps/Dns64App/App.cs`

### Administration

- [Authentication and roles](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Auth/AuthManager.cs): `DnsServerCore/Auth/AuthManager.cs`
- [Web administration service](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/DnsWebService.cs): `DnsServerCore/DnsWebService.cs`
- [Web API routes](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/WebServiceApi.cs): `DnsServerCore/WebServiceApi.cs`
- [Web console](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/www/js/main.js): `DnsServerCore/www/js/main.js`
- [Cluster management](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Cluster/ClusterManager.cs): `DnsServerCore/Cluster/ClusterManager.cs`
- [Query logging](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/LogManager.cs): `DnsServerCore/LogManager.cs`

### Network Services

- [DHCP server](https://github.com/technitiumsoftware/dnsserver/blob/master/DnsServerCore/Dhcp/DhcpServer.cs): `DnsServerCore/Dhcp/DhcpServer.cs`
- [Log export](https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/LogExporterApp/Strategy/ExportManager.cs): `Apps/LogExporterApp/Strategy/ExportManager.cs`
- [Query log stores](https://github.com/technitiumsoftware/dnsserver/blob/master/Apps/QueryLogsSqliteApp/App.cs): `Apps/QueryLogsSqliteApp/App.cs`

### Other components

- **DNS client**
- **Administrator**

## Connections

- DNS client → DNS server: queries
- DNS server → Authoritative zones: resolves zones (evidence: `DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs`)
- DNS server → Resolver caches: caches responses (evidence: `DnsServerCore/Dns/DnsServer.cs`)
- DNS server → DNS statistics: queues statistics (evidence: `DnsServerCore/Dns/StatsManager.cs`)
- DNS server → DNS applications: dispatches apps (evidence: `DnsServerCore/Dns/DnsServer.cs`)
- Authoritative zones → Zone implementations: manages zones (evidence: `DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs`)
- Advanced blocking → DNS applications: implements app contract (evidence: `Apps/AdvancedBlockingApp/App.cs`)
- Advanced forwarding → DNS applications: implements app contract (evidence: `Apps/AdvancedForwardingApp/App.cs`)
- DNS64 → DNS applications: implements app contract (evidence: `Apps/Dns64App/App.cs`)
- Administrator → Web console: administers
- Web console → Web administration service: uses console service
- Web administration service → Web API routes: routes requests (evidence: `DnsServerCore/DnsWebService.cs`)
- Web administration service → Authentication and roles: uses authentication (evidence: `DnsServerCore/DnsWebService.cs`)
- Web administration service → Cluster management: uses cluster manager (evidence: `DnsServerCore/DnsWebService.cs`)
- Web administration service → DHCP server: manages DHCP (evidence: `DnsServerCore/DnsWebService.cs`)
- Web administration service → Query logging: manages logs (evidence: `DnsServerCore/DnsWebService.cs`)
- Cluster management → Authoritative zones: updates cluster zones (evidence: `DnsServerCore/Cluster/ClusterManager.cs`)
- Log export → Query log stores: exports log data
