How returnfi/blitz works
Blitz is a Hysteria2 server management panel. The main workflow is an operator issuing management commands through the CLI, which delegates operations to its API layer; users can also manage the server through the WebPanel’s routed interface. The repository additionally includes traffic accounting, subscriptions, node configuration, Telegram management, WARP, and user storage. Several implementations are not sampled, so those capability branches are shown without inferred call links; edges reflect only visible calls or documented routing.
Main entry points: app.py Web Application · auth.py Authentication Middleware · cli_api.py CLI API · cli.py Management CLI
Components 22
Operator Entry
- Management CLI
core/cli.py - CLI API
core/cli_api.py
WebPanel
- Web Application
core/scripts/webpanel/app.py - Authentication Middleware
core/scripts/webpanel/middleware/auth.py - Session Management
core/scripts/webpanel/session/session.py - Web Configuration
core/scripts/webpanel/config/config.py - Web Dependencies
core/scripts/webpanel/dependency/dependency.py - Web Routes
core/scripts/webpanel/routers - Hysteria API Routes
core/scripts/webpanel/routers/api/v1/config/hysteria.py - Server API Routes
core/scripts/webpanel/routers/api/v1/server.py - User Management Routes
core/scripts/webpanel/routers/user/user.py
Proxy Management
- Hysteria Operations
core/scripts/hysteria2 - User Authentication
core/scripts/auth/user_auth.go - Traffic Accounting
core/traffic.py - Subscription Formats
core/scripts/normalsub/normalsub.py - Node Management
core/scripts/nodes/node.py
Companion Services
- Telegram Bot
core/scripts/telegrambot/runbot.py - WARP Integration
core/scripts/warp/warp.py - Scheduled Tasks
core/scripts/scheduler.py
Runtime State
- User Database
core/scripts/db/database.py - Shared Paths
core/scripts/paths.py
Other components
- Operator
Connections 12
- Operator → Management CLI: runs commands
core/cli.py - Management CLI → CLI API: delegates operations
core/cli.py - Web Application → Web Configuration: loads settings
core/scripts/webpanel/app.py - Web Application → Authentication Middleware: registers middleware
core/scripts/webpanel/app.py - Web Application → Web Dependencies: gets sessions
core/scripts/webpanel/app.py - Web Application → Web Routes: mounts routers
core/scripts/webpanel/app.py - Authentication Middleware → Session Management: validates sessions
core/scripts/webpanel/middleware/auth.py - Authentication Middleware → Web Configuration: checks settings
core/scripts/webpanel/middleware/auth.py - Web Dependencies → Session Management: creates manager
core/scripts/webpanel/dependency/dependency.py - Hysteria API Routes → CLI API: invokes operations
core/scripts/webpanel/routers/api/v1/config/hysteria.py - Server API Routes → CLI API: invokes operations
core/scripts/webpanel/routers/api/v1/server.py - Traffic Accounting → User Database: reads and updates
core/traffic.py