Bash script for installing sing-box in operating systems such as Arch / CentOS / Debian / OpenSUSE that support systemd.
Filesystem Hierarchy Standard (FHS)
Upstream URL: sing-box
Installed: /usr/local/bin/sing-box
...
# Working Directory
WorkingDirectory=/var/lib/sing-box
##
...
# /etc/systemd/system/sing-box.service
ExecStart=/usr/local/bin/sing-box run -c /usr/local/etc/sing-box/config.json
##
# /etc/systemd/system/[email protected]
ExecStart=/usr/local/bin/sing-box run -c /usr/local/etc/sing-box/%i.json
##
...
Install sing-box
bash -c "$(curl -L https://sing-box.vercel.app)" @ install
Remove sing-box
bash -c "$(curl -L https://sing-box.vercel.app)" @ remove
Install sing-box Pre-release version
bash -c "$(curl -L https://sing-box.vercel.app)" @ install --beta
Install custom version of sing-box
bash -c "$(curl -L https://sing-box.vercel.app)" @ install --version=1.5.3
Install sing-box using custom user
bash -c "$(curl -L https://sing-box.vercel.app)" @ install --user=root
Install sing-box Using GO
bash -c "$(curl -L https://sing-box.vercel.app)" @ install --go
Install sing-box and set environment variable CGO_ENABLED=1
while compling
bash -c "$(curl -L https://sing-box.vercel.app)" @ install --cgo
Complie sing-box for windows
bash -c "$(curl -L https://sing-box.vercel.app)" @ install --win
Install sing-box Using GO with custom Tags
bash -c "$(curl -L https://sing-box.vercel.app)" @ install --tag=with_gvisor,with_dhcp --go