docs: add Mermaid diagrams throughout docs

- plan.md: architecture flow diagram
- README.md: simple forwarder overview diagram
- story.md: DNS censorship and SOCKS5 proxy diagrams
- intra-comparison.md: all ASCII diagrams converted to Mermaid
This commit is contained in:
2026-07-06 23:09:06 +03:30
parent 861559ccca
commit d28f861075
4 changed files with 169 additions and 93 deletions

View File

@@ -17,17 +17,36 @@ A lightweight dual-protocol DNS forwarder written in Rust. It accepts DNS querie
## Architecture
```
┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐
DNS Client │─────▶│ DoH Forwarder │─────▶│ Upstream DoH │
(browser, │ HTTPS│ (this project) │ HTTPS│ (1.1.1.1, │
app) │◀─────│ /dns-query │◀─────│ 8.8.8.8, …) │
└─────────────┘ │ /health │ └─────────────────┘
│ └──────────────────┘
│ UDP/TCP ▲
│ (port 5353) │
└──────────────────────┘
System DNS (resolv.conf)
```mermaid
flowchart LR
subgraph clients["Clients"]
browser["Browser / App"]
os["OS DNS Client"]
end
subgraph forwarder["DoH Forwarder"]
doh["/dns-query (HTTP)"]
health["/health"]
dns["DNS Listener (UDP/TCP)"]
upstream["Upstream Client"]
end
subgraph upstreams["Upstream DoH Resolvers"]
cf["Cloudflare (1.1.1.1)"]
google["Google (8.8.8.8)"]
other["..."]
end
browser -- "HTTPS (RFC 8484)" --> doh
os -- "UDP/TCP :5353" --> dns
doh --> upstream
dns --> upstream
upstream -- "HTTPS POST" --> cf
upstream -- "HTTPS POST" --> google
upstream -- "HTTPS POST" --> other
cf -- "DNS response" --> upstream
google -- "DNS response" --> upstream
other -- "DNS response" --> upstream
```
## Tech Stack