# macOS Homebrew
brew install sing-box # 命令行 /opt/homebrew/etc/sing-box/config.json
brew install sfm # 桌面应用
/opt/homebrew/opt/sing-box/bin/sing-box version
# AlpineLinux
# /usr/bin/sing-box
# sing-box -D /var/lib/sing-box -C /etc/sing-box check
# sing-box -D /var/lib/sing-box -C /etc/sing-box run
apk add -X https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/testing/ --no-cache sing-box
kill -HUP $(pgrep sing-box) # reload
# https://github.com/SagerNet/sing-box/releases
# https://sing-box.sagernet.org/changelog/
VERSION=1.11.6
curl -L -o sing-box.tar.gz https://github.com/SagerNet/sing-box/releases/download/v${VERSION}/sing-box-${VERSION}-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/').tar.gz
# gtar -zxvf sing-box.tar.gz --strip-components=1 --wildcards '*/sing-box'
tar zxvf sing-box.tar.gz --strip-components=1 --wildcards '*/sing-box'
./sing-box version
# Linux
sudo mv sing-box /usr/local/bin/
# sudo mv sing-box /usr/bin/ # 配合 sing-box-openrc
apk add -X https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/testing/ --no-cache sing-box
docker run -d \
-v /etc/sing-box:/etc/sing-box/ \
--name=sing-box \
--restart=always \
ghcr.io/sagernet/sing-box \
-D /var/lib/sing-box \
-C /etc/sing-box/ run
sing-box version
sing-box check -c conf.json
sing-box run conf.json