Documentation - Three levels: DOCS/General (overview, configuration), DOCS/Deployment (choose a method, first steps), details per method in Containers/ and System_Services/; new root README and DOCS/README map. - Remove superseded pages (Deployment.md, Deployment_Docker/Native.md, Index.md); split the two scenario guides by section. - Isolate the Timeweb/Hysteria2 records in DEPLOYMENTS/timeweb-hysteria2/ (not linked from DOCS, listed in .graphifyignore). - Add DOCS/code_review/ with a time-stamped analysis of the code base. Gatherer (BUG-02, BUG-03) - Session key (CN, address, connected_since_ts), baseline from the active_sessions snapshot, grace period for sessions missing from the status. - Status file integrity (TITLE/TIME/END) and freshness; a torn read skips the tick. - Cache applied after commit; main loop survives exceptions, backs off, and stops cleanly on SIGTERM/SIGINT; new client rows start with the first frame's totals; five tests. JWT signing key (SEC-01) - No built-in default: Core and Profiler refuse to start with a missing, placeholder or short (< 32) key; shipped config.ini has an empty value. - Same rule in install.sh, update.sh (issues a new key when missing or weak), docker lib/entrypoint; five tests, conftest.py for the test key. Each change has a plan and a summary under DOCS/Changes/. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
54 lines
3.4 KiB
Markdown
54 lines
3.4 KiB
Markdown
# Overview
|
|
|
|
OpenVPN Monitor & Profiler is a web suite for an OpenVPN server: live traffic statistics and history, PKI and client-profile management, and the server process control, all in one UI.
|
|
|
|
## Components
|
|
|
|
| Component | Dir | Stack | What it does | Port |
|
|
|---|---|---|---|---|
|
|
| UI | `APP_UI/` | Vue 3 + Vite, served by Nginx | the web interface | 80 (containers, plain HTTP) / 8088 (system services, HTTPS) |
|
|
| Monitoring API | `APP_CORE/` | Flask (gunicorn) | statistics, authentication, accounts | 5001, internal |
|
|
| Data gatherer | `APP_CORE/` | Python daemon | reads the OpenVPN status log into the monitoring database | none |
|
|
| Profiler API | `APP_PROFILER/` | FastAPI (uvicorn) | PKI (easy-rsa), client profiles, server configuration, OpenVPN process control | 8000, internal |
|
|
| OpenVPN | system package or container | | the VPN server itself, started from the UI | 1194/udp (default) |
|
|
|
|
Nginx is the only public entry point: `/` is the UI, `/api/` the Monitoring API, `/profiles-api/` the Profiler API. Both APIs listen on `127.0.0.1` (or the internal container network) only.
|
|
|
|
```
|
|
Browser --> Nginx --/-----------> UI files
|
|
--/api/-------> Monitoring API --> monitoring DB <-- Data gatherer <-- openvpn-status.log
|
|
--/profiles-api/> Profiler API --> profiler DB, PKI (easy-rsa), client .ovpn files
|
|
|--> server.conf --> OpenVPN (root helper in system-service installs)
|
|
VPN clients --udp/1194--> OpenVPN
|
|
```
|
|
|
|
## Where the data lives
|
|
|
|
| Data | Content |
|
|
|---|---|
|
|
| Monitoring DB (SQLite) | traffic history and statistics, user accounts, 2FA |
|
|
| Profiler DB (SQLite) | client profiles, notes, PKI and server settings |
|
|
| PKI | CA, server and client keys and certificates, CRL, `ta.key`, `dh.pem` (**secret, back it up**) |
|
|
| Client profiles | generated `.ovpn` files |
|
|
| `server.conf` | generated by the profiler from the settings in the UI |
|
|
|
|
Exact locations per installation method: [Containers: volumes](../Deployment/Containers/Reference.md), [System services: layout](../Deployment/System_Services/Reference.md). Schema changes on update are handled by [database migrations](Database_Migrations.md).
|
|
|
|
## Glossary
|
|
|
|
| Term | Meaning |
|
|
|---|---|
|
|
| PKI | the certificate authority and the certificates issued by it; must be initialized once before the VPN server can be configured |
|
|
| Profile / client | one VPN user: a certificate plus the `.ovpn` file given to the user |
|
|
| Gatherer | the daemon that turns the OpenVPN status log into statistics |
|
|
| Root helper | (system services only) a small root script through which the unprivileged API installs `server.conf` and controls OpenVPN; see [Security architecture](Security_Architecture.md) |
|
|
| Variant A / B | the two container layouts: everything in one container / one container per component |
|
|
|
|
## Security in short
|
|
|
|
No built-in account (the first administrator is seeded once at install time); every API route needs a JWT; 2FA is available per user; server settings are validated before they reach the OpenVPN configuration; in system-service installs the APIs run as an unprivileged user. Details: [Security architecture](Security_Architecture.md).
|
|
|
|
## Where to go next
|
|
|
|
[Install it](../Deployment/README.md) · [Configuration](Configuration.md) · [Monitoring API](../Core_Monitoring/API_Reference.md) · [Profiler API](../Profiler_Management/API_Reference.md) · [UI architecture](../UI/Architecture.md)
|