2.8 KiB
2.8 KiB
Hysteria Control Panel
A desktop GUI application for managing and monitoring a Hysteria server. This control panel provides a user-friendly interface to interact with the Hysteria server's API, allowing administrators to view server statistics and manage users.
Features
- Secure Connection: Connect to your Hysteria server's API using its address, port, and secret.
- Connection Profiles: Save connection details (except for the secret, optionally) for quick access.
- Traffic Monitoring: View real-time and total data usage (Upload/Download) for all users.
- Online User Management: See a list of currently connected users and their IP addresses.
- User Disconnection: Forcefully disconnect (kick) one or more users from the server.
- Active Stream Viewer: Monitor the active data streams on the server.
- Auto-Refresh: Automatically updates statistics every 2 seconds to provide a live view of the server status.
Technical Details
This application is built with Python and leverages the following libraries:
- UI Framework: ttkbootstrap
- The user interface is built using
ttkbootstrap, a theme extension for Python's standardtkinterGUI library. It provides modern and professional-looking widgets.
- The user interface is built using
- API Communication: requests
- The
requestslibrary is used to handle all HTTP communication with the Hysteria server's REST API.
- The
- Configuration:
- Connection profiles are stored locally in a
config.jsonfile located in the user's system-specific configuration directory (~/.config/hysteria_panel/on Linux/macOS).
- Connection profiles are stored locally in a
Project Structure
The project is organized into several modules:
src/hysteria_panel/: Main package directory.__main__.py: The main entry point of the application.gui.py: Handles the main application window, layout, connection logic, and tab management.api.py: Contains theHysteriaAPIclass, which encapsulates all the logic for making API calls to the server.utils.py: Provides helper functions for formatting data (e.g., bytes to KB/MB/GB) and managing the configuration file.views/: A sub-package containing the different UI tabs (Traffic, Online Users, Streams) as separate modules for better organization.
Getting Started
Prerequisites
- Python 3.12+
- A running Hysteria server with the API enabled.
Installation & Running
-
Clone the repository:
git clone https://github.com/your-username/hysteria-panel.git cd hysteria-panel -
Install dependencies:
pip install -r requirements.txt -
Run the application:
python -m src.hysteria_panel
