How greepar/hypanel works
HyPanel is a web control panel for centrally managing proxy services across enrolled nodes. Administrators configure nodes, services, users, groups, certificates, and updates in the browser; the Server persists panel state and coordinates with Agents, which enroll and actively poll for desired state and commands, then reconcile services and report status. Users receive Clash/Mihomo subscriptions. The README documents backup/restore and online updates as additional capabilities. Some subsystem links are based on documented responsibilities and paths; unsampled implementation details are not inferred.
Main entry points: SyncWorker.cs Sync worker · Endpoints Admin endpoints · ServiceReconciler.cs Service reconciler · SubscriptionEndpoints.cs Subscriptions
Components 23
Web panel
- Panel UI
web/HyPanel.Web/src/app.tsx - API client
web/HyPanel.Web/src/api.ts
Control plane
- Subscriptions
src/HyPanel.Server/Endpoints/SubscriptionEndpoints.cs - Admin endpoints
src/HyPanel.Server/Endpoints - Enrollment
src/HyPanel.Server/Persistence/EnrollmentService.cs - Agent sync API
src/HyPanel.Server/Endpoints/AgentSyncEndpoints.cs - Panel repository
src/HyPanel.Server/Persistence/SqliteServerRepository.cs - Certificate management
src/HyPanel.Server/Endpoints/AdminCertificatesEndpoints.cs
Node agent
- Agent identity
src/HyPanel.Agent/Enrollment/AgentIdentityManager.cs - Sync worker
src/HyPanel.Agent/Sync/SyncWorker.cs - Service reconciler
src/HyPanel.Agent/Reconciliation/ServiceReconciler.cs - Backend providers
src/HyPanel.Agent/Backends - Process supervision
src/HyPanel.Agent/Backends/Infrastructure/BackendProcessSupervisor.cs - Backend artifacts
src/HyPanel.Agent/Backends/Infrastructure/BackendBinaryManager.cs - Port hopping
src/HyPanel.Agent/Backends/Infrastructure/PortHoppingManager.cs
Operations
- Release catalog
src/HyPanel.Server/Releases/ReleaseCatalog.cs - Agent updates
src/HyPanel.Agent/Updates/AgentUpdater.cs - Server updates
src/HyPanel.Server/Updates/ServerUpdateService.cs - Backup and restore
src/HyPanel.Server/Backup/BackupRestoreService.cs
Other components
- Administrator
- Subscription user
- Node Agent
src/HyPanel.Agent/Program.cs - Proxy clients
Connections 25
- Administrator → Panel UI: uses
- Panel UI → API client: requests
- API client → Admin endpoints: calls
- API client → Subscriptions: fetches
- Subscription user → Subscriptions: requests
- Subscriptions → Panel repository: reads
- Admin endpoints → Panel repository: reads and writes
- Admin endpoints → Enrollment: issues tokens
- Node Agent → Agent identity: ensures identity
- Agent identity → Enrollment: enrolls over HTTPS
- Node Agent → Sync worker: runs
- Sync worker → Agent sync API: polls and reports
- Agent sync API → Panel repository: exchanges state
- Sync worker → Service reconciler: applies desired state
- Service reconciler → Backend providers: validates and configures
- Service reconciler → Backend artifacts: ensures binaries
- Service reconciler → Process supervision: starts and monitors
- Sync worker → Port hopping: applies rules
- Admin endpoints → Certificate management: manages
- Agent updates → Sync worker: receives offers
- Sync worker → Agent updates: applies offers
- Release catalog → Agent sync API: provides artifacts
- Admin endpoints → Backup and restore: manages backups
- Server updates → Release catalog: checks releases
- Proxy clients → Subscriptions: consumes