refactor: simplify service installation process

This commit is contained in:
2026-07-19 20:07:26 +08:00
parent a2630df9e0
commit dcdb54b76c
3 changed files with 75 additions and 9 deletions

View File

@ -116,16 +116,10 @@ ss service reload [--name <name>] # reload config via mihomo's API, no restart
ss service status [--name <name>]
```
Linux / macOS (installing the service needs root):
```bash
sudo env SF_CONFIG_DIR=$HOME/basicfiles/cli/ss ss service install
```
`install`/`uninstall`/`start`/`stop`/`restart` need root/admin privileges:
Windows (run from an elevated/Administrator shell):
```powershell
$env:SF_CONFIG_DIR = "$HOME\basicfiles\cli\ss"
ss.exe service install
```
- **Linux / macOS**: just run the command directly — `ss` re-execs itself under `sudo` automatically, prompting for your password if needed.
- **Windows**: run from an elevated/Administrator shell — `ss.exe service install`.
## Development