Use uv to manage environment
This commit is contained in:
62
README.md
Normal file
62
README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# 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](https://github.com/israel-dryer/ttkbootstrap)
|
||||
- The user interface is built using `ttkbootstrap`, a theme extension for Python's standard `tkinter` GUI library. It provides modern and professional-looking widgets.
|
||||
- **API Communication**: [requests](https://requests.readthedocs.io/en/latest/)
|
||||
- The `requests` library is used to handle all HTTP communication with the Hysteria server's REST API.
|
||||
- **Configuration**:
|
||||
- Connection profiles are stored locally in a `config.json` file located in the user's system-specific configuration directory (`~/.config/hysteria_panel/` on Linux/macOS).
|
||||
|
||||
### 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 the `HysteriaAPI` class, 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
|
||||
|
||||
1. **Clone the repository:**
|
||||
```bash
|
||||
git clone https://github.com/your-username/hysteria-panel.git
|
||||
cd hysteria-panel
|
||||
```
|
||||
|
||||
2. **Install dependencies:**
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
3. **Run the application:**
|
||||
```bash
|
||||
python -m src.hysteria_panel
|
||||
```
|
||||
Reference in New Issue
Block a user