Fix links

This commit is contained in:
Penguinehis
2026-09-29 10:18:56 -03:00
parent b4a8a70e54
commit 4673f8c58e
6 changed files with 88 additions and 33 deletions
+12 -4
View File
@@ -4,15 +4,23 @@ DragonCoreSSH server with a terminal administration menu and HTTP API. Based on
## Install on a fresh Linux/systemd host
Extract this archive, then run `sudo bash install.sh` from the extracted `DragonCoreSSH-CLI` directory. The installer sets up the Go server, PostgreSQL, Xray, service, and the `menu` command. If `/usr/local/bin/menu` already exists, it is saved as `menu.backup.<timestamp>` before the DragonCoreSSH command is installed. It generates all credentials. It needs a compatible Linux distribution and access to its system packages, the Go toolchain download, and Xray release download. Run it only on a fresh server: like the original installer it generates new database and configuration credentials.
Clone [DragonCoreNEWCLI](https://git.dr2.site/penguinehis/DragonCoreNEWCLI) and run the installer from the repository root:
Run `menu` from a root shell, or `sudo menu` otherwise. The `dragoncore` command remains an alias. Other commands: `sudo menu status`, `sudo menu users`, `sudo menu logs`, `sudo menu api-password show`, `sudo menu api-password change`. The change command generates a new API password, restarts the service, verifies it, and restores the old one if verification fails. It never prompts for a password. Creating/resetting SSH users generates credentials and prints them once.
```bash
git clone https://git.dr2.site/penguinehis/DragonCoreNEWCLI
cd DragonCoreNEWCLI
sudo bash install.sh
```
The installer sets up the Go server, PostgreSQL, Xray, service, and the `menu` command. If `/usr/local/bin/menu` already exists, it is saved as `menu.backup.<timestamp>` before the DragonCoreSSH command is installed. It generates all credentials. It needs a compatible Linux distribution and access to its system packages, the Go toolchain download, and Xray release download. Run it only on a fresh server: like the original installer it generates new database and configuration credentials. An extracted source archive also works for a local install.
Run `menu` from a root shell, or `sudo menu` otherwise. The `dragoncore` command remains an alias. Other commands: `sudo menu status`, `sudo menu users`, `sudo menu logs`, `sudo menu update`, `sudo menu api-password show`, `sudo menu api-password change`. The change command generates a new API password, restarts the service, verifies it, and restores the old one if verification fails. It never prompts for a password. Creating/resetting SSH users generates credentials and prints them once.
The menu detects the terminal width. On a phone it uses a compact status header and wraps menu labels and account details; on a wider terminal it uses the fuller layout. If an SSH app reports the wrong width, run `menu --mobile` to force 40 columns, or set `DRAGONCORE_COLUMNS=36` to choose another width. For editing advanced JSON from a phone SSH client, install `nano` or set `$EDITOR` to your preferred terminal editor.
## Migrate an existing DragonCoreSSH-NewWEB installation
Back up `/opt/sshpanel`, its PostgreSQL database, and `/etc/systemd/system/sshpanel.service` first. Extract this release on the server and run `sudo bash update.sh` from its directory. The updater builds the CLI version, preserves `.env`, `config.json`, Xray configuration, SSH keys, accounts, and database, then restarts the service. It reads this local release only; it does not fetch the NewWEB branch. The previous binary is saved as `/opt/sshpanel/sshpanel.bak`. The old `admin/` directory is no longer served. The existing `ADMIN_HTTP_ADDR` setting is preserved; set it to `127.0.0.1:9090` and restart if remote API access is unnecessary.
Back up `/opt/sshpanel`, its PostgreSQL database, and `/etc/systemd/system/sshpanel.service` first. Run `sudo menu update` or `sudo bash /opt/sshpanel/update.sh`. The updater fetches the latest commit from the default branch of `https://git.dr2.site/penguinehis/DragonCoreNEWCLI`, builds it before stopping the service, preserves `.env`, `config.json`, Xray configuration, SSH keys, accounts, and database, then restarts the service. The previous binary is saved as `/opt/sshpanel/sshpanel.bak`. To select a branch, run `sudo env UPDATE_REF=branch-name bash /opt/sshpanel/update.sh`. For an extracted offline release, run `sudo env UPDATE_SOURCE=local bash update.sh` in its source directory. The old `admin/` directory is no longer served. The existing `ADMIN_HTTP_ADDR` setting is preserved; set it to `127.0.0.1:9090` and restart if remote API access is unnecessary.
## API
@@ -30,7 +38,7 @@ Example: `curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:9090/api/users
- Configuration: banner, guided SSH listener ports and default limits, full server JSON, Xray JSON, bot settings display, managed servers display. The service validates settings through its API and applies server settings live.
- Reseller management remains in the Telegram bot; the CLI has no reseller menu.
- API password: view and rotate.
- Service status, logs, and restart.
- Service status, logs, restart, and Git update.
Full configuration remains available through the server API. Use the JSON editor option for settings not covered by guided prompts. This uses the editor in `$EDITOR`, or `nano` if unset. The CLI never requests a login or password. Root access to `.env` is its local authentication boundary.