diff --git a/README.md b/README.md index 48ce645..0e841f2 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,106 @@ It combines: - `desktop-client/` Tauri desktop client - `deploy/` Docker Compose, reverse proxy, and gateway assets +## Architecture Overview + +```text + NexaVPN Architecture + + ┌──────────────────────────────┐ + │ Internet / WAN │ + └──────────────┬───────────────┘ + │ + │ HTTPS + WireGuard + │ + ┌───────────────────────┴────────────────────────┐ + │ │ + │ Public entry on NexaVPN host │ + │ │ + │ ┌──────────────────────────────────────────┐ │ + │ │ reverse-proxy (nginx / public ingress) │ │ + │ │ - admin-vpn.nesterovic.cc │ │ + │ │ - vpn.nesterovic.cc │ │ + │ └───────────────┬──────────────────────────┘ │ + │ │ │ + │ HTTP/HTTPS│ │ + │ │ │ + │ ┌───────────────▼──────────────┐ │ + │ │ public-web │ │ + │ │ static frontend + /api │ │ + │ └───────────────┬──────────────┘ │ + │ │ │ + │ ▼ │ + │ ┌──────────────────────────────────────────┐ │ + │ │ backend (Go control plane) │ │ + │ │ - auth / users / devices / policies │ │ + │ │ - gateway sync bundle │ │ + │ │ - service catalog + dns override API │ │ + │ └───────────────┬──────────────────────────┘ │ + │ │ │ + │ ▼ │ + │ ┌──────────────────────────────────────────┐ │ + │ │ postgres │ │ + │ │ - users / groups / policies / devices │ │ + │ │ - wireguard peers / ip allocations │ │ + │ │ - service definitions / runtime stats │ │ + │ └──────────────────────────────────────────┘ │ + │ │ + │ ┌──────────────────────────────────────────┐ │ + │ │ gateway │ │ + │ │ - wg0 │ │ + │ │ - syncs peer state from backend │ │ + │ │ - renders nftables policy │ │ + │ │ - enforces split tunnel / service ACLs │ │ + │ └───────────────┬──────────────────────────┘ │ + │ │ │ + │ │ VPN client traffic │ + │ ▼ │ + │ ┌──────────────────────────────────────────┐ │ + │ │ vpn-dns │ │ + │ │ - upstream: internal DNS servers │ │ + │ │ - overrides service domains │ │ + │ │ to NexaVPN access-proxy IP │ │ + │ └───────────────┬──────────────────────────┘ │ + │ │ │ + │ ▼ │ + │ ┌──────────────────────────────────────────┐ │ + │ │ access-proxy │ │ + │ │ - checks source VPN IP │ │ + │ │ - checks Host / TLS SNI │ │ + │ │ - forwards only allowed services │ │ + │ └───────────────┬──────────────────────────┘ │ + └──────────────────┼─────────────────────────────┘ + │ + ▼ + ┌──────────────────────────────┐ + │ Internal LAN / service tier │ + │ - Zoraxy / reverse proxies │ + │ - Jellyfin / PVE / apps │ + │ - DNS servers │ + └──────────────────────────────┘ + + +Desktop flow + + NexaVPN desktop client + │ + ├─ login / sync profile ─────────────► backend + │ + ├─ gets WireGuard profile + DNS ─────► backend + │ + ├─ connects WireGuard tunnel ────────► gateway:51900/udp + │ + ├─ normal split-tunnel CIDR traffic ─► internal LAN targets + │ + └─ service-domain traffic + nesflix.cc + │ + ├─ DNS query ─────────────────► vpn-dns + ├─ override answer ───────────► access-proxy IP + ├─ HTTPS with Host/SNI ───────► access-proxy + └─ forwarded if policy allows ► Zoraxy / upstream service +``` + ## Phase Status This repository contains the initial production-minded MVP scaffold: