The system acts as a centralized Control Plane managing OpenVPN nodes. It provides an API-first approach to manage VPN users, servers, and configuration generation.
- Tech Stack: Next.js (App Router), MySQL, Tailwind CSS.
- Responsibility:
- Manage users, servers, and session connectivity logging.
- Generate and render
.ovpnconfiguration files using templates. - Implement RBAC (Admin/User).
- Provide dashboards and management UI.
- User Request: User logs into the Web Panel.
- Access Control: Backend verifies user status, expiration, and traffic limits against the MySQL database.
- Download: The user downloads a pre-formatted
.ovpnconfiguration, with credentials/keys injected by the server.
/app/ # Next.js App Router (UI & API)
/components/ # Reusable UI components
/lib/ # Core Utilities
db.ts # MySQL Pool & Query helper
logger.ts # Centralized logging (pino)
ovpn-generator.ts # Config Template Engine
/public/ # Static Assets
/scripts/ # SQL scripts & maintenance
- Authentication: JWT/Session based authentication.
- Data Integrity: MySQL with parameterized queries to prevent SQL injections.
- Logging: Structured logging using Pino.
The following features mentioned in some legacy documentation are partially implemented or pending realization:
- Multi-Node Fleet Management: Centralized orchestration is limited. Syncing users across nodes requires manual intervention or extensions.
- Live Monitoring: Dashboard metrics are placeholder-based or static. Real-time integration with node-level agents (like
vnstator OpenVPN Management Interface) is pending. - CRL Syncing: Real-time revocation syncing to remote nodes requires additional agent setup.