2022-08-24 13:12:21 +08:00
|
|
|
#### Requirements
|
2022-08-03 22:23:40 +08:00
|
|
|
|
|
|
|
* Linux & Systemd
|
|
|
|
* Git
|
|
|
|
* C compiler environment
|
|
|
|
|
|
|
|
#### Install
|
|
|
|
|
|
|
|
```shell
|
|
|
|
git clone https://github.com/SagerNet/sing-box
|
|
|
|
cd sing-box
|
2022-08-27 22:27:58 +08:00
|
|
|
./release/local/install_go.sh # skip if you have go1.19 already installed
|
2022-08-03 22:23:40 +08:00
|
|
|
./release/local/install.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
Edit configuration file in `/usr/local/etc/sing-box/config.json`
|
|
|
|
|
|
|
|
```shell
|
|
|
|
./release/local/enable.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Update
|
|
|
|
|
|
|
|
```shell
|
|
|
|
./release/local/update.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Other commands
|
|
|
|
|
|
|
|
| Operation | Command |
|
|
|
|
|-----------|-----------------------------------------------|
|
|
|
|
| Start | `sudo systemctl start sing-box` |
|
|
|
|
| Stop | `sudo systemctl stop sing-box` |
|
|
|
|
| Kill | `sudo systemctl kill sing-box` |
|
|
|
|
| Restart | `sudo systemctl restart sing-box` |
|
|
|
|
| Logs | `sudo journalctl -u sing-box --output cat -e` |
|
|
|
|
| New Logs | `sudo journalctl -u sing-box --output cat -f` |
|
|
|
|
| Uninstall | `./release/local/uninstall.sh` |
|