This commit is contained in:
Penguinehis
2026-09-29 12:11:40 -03:00
parent 81d71999b4
commit 6afe9bd2c3
3 changed files with 665 additions and 34 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ sudo menu
The installer installs required packages, Go, PostgreSQL, Xray, the `sshpanel` systemd service, and the `menu` command. It generates service credentials and writes configuration under `/opt/sshpanel`. It needs network access for system packages, Go, and Xray. An extracted source archive can be installed with `sudo bash install.sh` from its root. If `/usr/local/bin/menu` already exists, the installer saves a timestamped backup before replacing it. Use a fresh server because installation creates new database and configuration credentials.
Run `sudo menu` for the command menu. `sudo dragoncore` is an alias. The header shows CPU, RAM, disk, uptime, network traffic, SSH and Xray activity, and service status. Each menu redraw clears the visible terminal; after a command prints results, press Enter to return to the menu. The menu adjusts to narrow terminals; `sudo menu --mobile` forces the compact layout, or set `DRAGONCORE_COLUMNS=36`. A terminal editor such as `nano` or `$EDITOR` is used for advanced JSON settings.
Run `sudo menu` for the command menu. `sudo dragoncore` is an alias. The header shows CPU, RAM, disk, uptime, network traffic, SSH and Xray activity, and service status. Each menu redraw clears the visible terminal; after a command prints results, press Enter to return to the menu. The menu adjusts to narrow terminals; `sudo menu --mobile` forces the compact layout, or set `DRAGONCORE_COLUMNS=36`. Long menus have `n`/`p` page navigation. Configuration uses guided fields instead of opening a JSON editor.
| Command | Purpose |
| --- | --- |
@@ -48,7 +48,7 @@ The CLI generates SSH account passwords and Xray UUIDs when creating them. It do
- **Xray:** manage inbounds and clients, generate UUIDs, adjust limits and quotas, reset traffic, edit JSON, control the service, and configure shared listener ports.
- **Connection modes:** inspect SSH/TLS, DNSTT, BHTTP, BTUN, HCR, UDPGW, and Xray status, settings, and available logs; manage TLS certificates and DNSTT keys.
- **VPS and traffic:** CPU, RAM, storage, uptime, per-interface traffic, daily/monthly totals, system logs, and update status.
- **Configuration and service:** banner and listener settings, full server JSON, bot configuration display, managed servers display, start/stop/restart controls, and API password rotation.
- **Configuration and service:** guided SSH, TLS, DNSTT, BHTTP, BTUN, HCR, UDPGW, Xray, and bot settings; managed server overview and settings; service controls and API password rotation. Existing remote server credentials can be retained while editing. Adding a remote server requires its credential through the authenticated API.
## HTTP API
@@ -121,7 +121,7 @@ curl -X POST http://127.0.0.1:9090/api/users/create \
| POST | `/api/resellers/create` | Admin | Create/update reseller account |
| DELETE | `/api/resellers/delete?username=name` | Admin | Delete reseller account |
Managed server JSON uses `id` (for updates), `name`, `base_url`, `admin_username`, `admin_key`, `enable_ssh`, `enable_xray`, and `is_active`. Configuration POST expects the server configuration JSON; read it with GET, modify the desired fields, and POST the resulting document. The CLI provides guided settings and a JSON editor for advanced options. Reseller routes remain available to the bot and other API integrations, while reseller management stays outside the CLI.
Managed server JSON uses `id` (for updates), `name`, `base_url`, `admin_username`, `admin_key`, `enable_ssh`, `enable_xray`, and `is_active`. Configuration POST expects the server configuration JSON; read it with GET, modify the desired fields, and POST the resulting document. The CLI reads that document internally, changes the selected field, and saves it through the API. It presents menus instead of a JSON editor. Reseller routes remain available to the bot and other API integrations, while reseller management stays outside the CLI.
Reseller create/update JSON uses `username`, `password`, `max_users`, `expires_at` (RFC3339 or empty), and `is_active`. A new reseller requires a password in the API request; omitting it on an update leaves the existing password intact. The CLI never asks its operator for one.