How vpn-vendor/vpn-panel works
VPN Panel is a self-hosted office VPN-gateway control panel, with both browser and console entry points. The main workflow is to complete first-time network setup, configure gateway services, and inspect their status and diagnostics; backup/restore and security administration are substantial supporting capabilities. The web routing and sampled services show several controller-to-service links, while the agent boundary is visible through RPC clients and the agent server. Some capability links are documented in the README rather than verified in sampled implementation.
Main entry points: client.go Agent RPC · web.go Web routes · vpn_controller.go VPN profiles and status · service.go Discovery and checks
Components 22
Panel and access
- Browser panel
public/js/app.js - Web routes
routes/web.go - First-run wizard
app/http/controllers/setup_controller.go - Login and devices
app/services/auth - Console menu
internal/console
Gateway configuration
- Network setup
app/services/network/service.go - VPN profiles and status
app/http/controllers/vpn_controller.go - DHCP service
app/services/dhcp/service.go - DNS service
app/services/dns/service.go - Traffic prioritization
app/services/qos/service.go
Operations and safety
- Device diagnostics
app/http/controllers/diagnostics_controller.go - Discovery and checks
app/services/diag/service.go - Security controls
app/http/controllers/security_controller.go - Backup and restore
app/http/controllers/backup_controller.go - Support reports
app/services/support/service.go - Local application store
app/models/device.go
System agent
- Agent RPC
internal/agentrpc/client.go - Privileged gateway agent
cmd/vpn-agent/main.go - VPN configuration generators
internal/ovpngen/ovpngen.go - Network diagnosis engine
internal/diagnose/diagnose.go
Other components
- Office administrator
- VPN provider configuration
Connections 22
- Office administrator → Browser panel: uses browser
- Office administrator → Console menu: uses console
- Browser panel → Web routes: requests pages
- Web routes → First-run wizard: routes requests
routes/web.go - Web routes → VPN profiles and status: routes requests
routes/web.go - Web routes → Device diagnostics: routes requests
routes/web.go - First-run wizard → Login and devices: uses
app/http/controllers/setup_controller.go - First-run wizard → Network setup: reads network state
app/http/controllers/setup_controller.go - VPN profiles and status → Network setup: reads network roles
app/http/controllers/vpn_controller.go - VPN profiles and status → VPN provider configuration: imports profile
app/http/controllers/vpn_controller.go - Network setup → Agent RPC: calls agent
app/services/network/service.go - VPN profiles and status → Agent RPC: calls agent
- Device diagnostics → Discovery and checks: requests checks
app/http/controllers/diagnostics_controller.go - Discovery and checks → Network diagnosis engine: builds report
app/services/diag/service.go - Discovery and checks → Agent RPC: requests probes
app/services/diag/service.go - Discovery and checks → Local application store: records devices
app/services/diag/service.go - Security controls → Network setup: reads network status
app/http/controllers/security_controller.go - Security controls → Agent RPC: uses agent
app/http/controllers/security_controller.go - Backup and restore → VPN provider configuration: exports settings
- Agent RPC → Privileged gateway agent: sends RPC
- Privileged gateway agent → VPN configuration generators: applies VPN config
- Console menu → Backup and restore: offers backup commands