ayurishchevandClaude Sonnet 5.5 ad6995bb63 Docs restructure, code review, gatherer reliability, JWT key fail-closed
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>
2026-10-05 20:30:45 +03:00

OpenVPN Monitor & Profiler

Web suite for OpenVPN servers: real-time traffic monitoring, history and analytics, PKI and client-profile management, one UI.

Component Dir Stack Port
UI APP_UI/ Vue 3 + Vite, served by Nginx 80 (containers) / 8088 (system services, HTTPS)
Monitoring API + data gatherer APP_CORE/ Flask (gunicorn), Python daemon 5001, internal
Profiler API APP_PROFILER/ FastAPI (uvicorn) 8000, internal

Nginx is the only public entry point. More: Overview.

Get it running

  1. Pick a method (comparison), clone the repository on the host and run one command as root:

    Method Command Guide
    Containers (Docker) deploy/docker/install.sh --variant a (b = one container per component) Containers
    System services (Alpine, Debian, Ubuntu) deploy/native/install.sh --prefix /opt/OpenVPN-Monitoring-Simple System services

    Not sure? Docker on the host: containers, variant A. Otherwise: system services.

  2. The script prints the URL and the administrator password once (no default account exists).

  3. Follow First steps: secure the account, initialize the PKI, configure and start the VPN server, create the first client.

Optional: NAT, MSS clamping and TTL for the VPN clients on system-service hosts: deploy/native/firewall.sh --dry-run (Firewall).

Documentation

Level Where
General information Overview · Configuration · Security architecture · Database migrations
Installation methods Choose a method · First steps
Details per method Containers (operations, reference, troubleshooting) · System services (operations, reference, web UI, firewall, nginx, troubleshooting)
APIs Monitoring · Profiler · UI
Changes Changes and results
Code review DOCS/code_review/ (state of the code, risks, recommendations; time-stamped)

The full map: DOCS/README.md.

Security defaults

  • No built-in account; the first administrator is seeded once at install time. Change the username and password and enable 2FA in Account Settings.
  • No default signing key: both APIs refuse to start without a random OVPMON_API_SECRET_KEY of at least 32 characters (installers generate one).
  • All API routes require a JWT; server and PKI settings are validated before they reach server.conf.
  • System-service installs: the APIs run as the unprivileged user ovpmon; a root helper (doas, fixed commands) installs the validated server.conf and controls OpenVPN.
  • CORS is same-origin only unless OVPMON_CORS_ORIGINS is set; brute-force limits on login.

Keep easy-rsa/, client-config/, databases and *.env out of git: they contain private keys and secrets.

Repository layout

Path Content
APP_UI/, APP_CORE/, APP_PROFILER/ the three components (each has its own short README for development)
deploy/docker/, deploy/allinone/, docker-compose*.yml container installation
deploy/native/, deploy/ui-dist/ system-service installation and the ready web UI build
DOCS/ documentation
DEPLOYMENTS/ records of one concrete site (not product documentation)
S
Description
No description provided
Readme
2.2 MiB
0 Stars 1 Watchers 0 Forks
Languages
Python 46%
Shell 26.7%
Vue 18.2%
CSS 4.9%
JavaScript 3.2%
Other 0.9%