sing-box 配置示例
See the code| 协议(组合) | Multiplex | TCP Brutal | MPTCP |
|---|---|---|---|
| Shadowsocks | 支持 | ✔️ | ✔️ |
| Trojan | 支持 | ✔️ | ✔️ |
| VLESS-Vision-TLS | 不支持 1 | ❌ 1 | ✔️ |
| VLESS-Vision-REALITY | 不支持 1 | ❌ 1 | ✔️ |
| VLESS-gRPC-REALITY | 自带 | ❌ | ✔️ |
| VLESS-HTTP2-REALITY | 自带 | ❌ | ✔️ |
| VLESS-gRPC-TLS | 自带 | ❌ | ✔️ |
| VMess | 支持 | ✔️ | ✔️ |
| VMess-WebSocket | 支持 | ✔️ | ✔️ |
| VMess-WebSocket-TLS | 支持 | ✔️ | ✔️ |
| VMess-HTTPUpgrade-TLS | 支持 | ✔️ | ✔️ |
1: "flow": "" 留空,或不写 "flow": "" 时支持
安装正式版
bash -c "$(curl -L sing-box.vercel.app)" @ install
安装预发布版
bash -c "$(curl -L sing-box.vercel.app)" @ install --beta
编译安装最新版
bash -c "$(curl -L sing-box.vercel.app)" @ install --go
卸载
bash -c "$(curl -L sing-box.vercel.app)" @ remove
| 项目 | |
|---|---|
| 程序 | /usr/local/bin/sing-box |
| 配置 | /usr/local/etc/sing-box/config.json |
| 工作目录 | /var/lib/sing-box |
| 热载 | systemctl reload sing-box |
| 重启 | systemctl restart sing-box |
| 状态 | systemctl status sing-box |
| 查看日志 | journalctl -u sing-box -o cat -e |
| 实时日志 | journalctl -u sing-box -o cat -f |
curl -Lo sing-box.tar.gz https://github.com/SagerNet/sing-box/releases/latest/download/$(curl https://api.github.com/repos/SagerNet/sing-box/releases|grep -E '"name": "sing-box-.*-linux-amd64.tar.gz"'|grep -Pv '(alpha|beta|rc)'|sed -n 's/.*"name": "\(.*\)".*/\1/p'|head -1) && tar -xzf sing-box.tar.gz && cp -f sing-box-*/sing-box . && rm -r sing-box.tar.gz sing-box-* && chown root:root sing-box && chmod +x sing-box && mv -f sing-box /usr/local/bin/
curl -Lo /etc/systemd/system/sing-box.service https://raw.githubusercontent.com/chika0801/sing-box-examples/main/sing-box.service && systemctl daemon-reload
systemctl enable --now sing-box
| 项目 | |
|---|---|
| 程序 | /usr/local/bin/sing-box |
| 配置 | /root/sing-box_config.json |
| geoip | /root/geoip.db |
| geosite | /root/geosite.db |
| 热载 | systemctl reload sing-box |
| 重启 | systemctl restart sing-box |
| 状态 | systemctl status sing-box |
| 查看日志 | journalctl -u sing-box -o cat -e |
| 实时日志 | journalctl -u sing-box -o cat -f |
systemctl disable --now sing-box && rm -f /usr/local/bin/sing-box /root/sing-box_config.json /etc/systemd/system/sing-box.service
下载Android客户端程序SFA-arm64-v8a.apk。
参考客户端配置示例,按需修改后导入。
下载Windows客户端程序sing-box-windows-amd64.zip。
新建一个批处理文件,内容为:
start /min sing-box.exe run
参考客户端配置示例,按需修改后将文件名改为 config.json,与 sing-box.exe,批处理文件放在同一文件夹里。
右键点击 sing-box.exe 选择属性,选择兼容性,选择以管理员身份运行此程序,确定。
运行批处理文件,在弹出的用户账户控制对话框中,选择是。
307 followers · starred Feb 2025
238 followers · starred Jan 2024
9 followers · starred Nov 2023
34 followers · starred Apr 2026
sing-box 配置示例
See the code| 协议(组合) | Multiplex | TCP Brutal | MPTCP |
|---|---|---|---|
| Shadowsocks | 支持 | ✔️ | ✔️ |
| Trojan | 支持 | ✔️ | ✔️ |
| VLESS-Vision-TLS | 不支持 1 | ❌ 1 | ✔️ |
| VLESS-Vision-REALITY | 不支持 1 | ❌ 1 | ✔️ |
| VLESS-gRPC-REALITY | 自带 | ❌ | ✔️ |
| VLESS-HTTP2-REALITY | 自带 | ❌ | ✔️ |
| VLESS-gRPC-TLS | 自带 | ❌ | ✔️ |
| VMess | 支持 | ✔️ | ✔️ |
| VMess-WebSocket | 支持 | ✔️ | ✔️ |
| VMess-WebSocket-TLS | 支持 | ✔️ | ✔️ |
| VMess-HTTPUpgrade-TLS | 支持 | ✔️ | ✔️ |
1: "flow": "" 留空,或不写 "flow": "" 时支持
安装正式版
bash -c "$(curl -L sing-box.vercel.app)" @ install
安装预发布版
bash -c "$(curl -L sing-box.vercel.app)" @ install --beta
编译安装最新版
bash -c "$(curl -L sing-box.vercel.app)" @ install --go
卸载
bash -c "$(curl -L sing-box.vercel.app)" @ remove
| 项目 | |
|---|---|
| 程序 | /usr/local/bin/sing-box |
| 配置 | /usr/local/etc/sing-box/config.json |
| 工作目录 | /var/lib/sing-box |
| 热载 | systemctl reload sing-box |
| 重启 | systemctl restart sing-box |
| 状态 | systemctl status sing-box |
| 查看日志 | journalctl -u sing-box -o cat -e |
| 实时日志 | journalctl -u sing-box -o cat -f |
curl -Lo sing-box.tar.gz https://github.com/SagerNet/sing-box/releases/latest/download/$(curl https://api.github.com/repos/SagerNet/sing-box/releases|grep -E '"name": "sing-box-.*-linux-amd64.tar.gz"'|grep -Pv '(alpha|beta|rc)'|sed -n 's/.*"name": "\(.*\)".*/\1/p'|head -1) && tar -xzf sing-box.tar.gz && cp -f sing-box-*/sing-box . && rm -r sing-box.tar.gz sing-box-* && chown root:root sing-box && chmod +x sing-box && mv -f sing-box /usr/local/bin/
curl -Lo /etc/systemd/system/sing-box.service https://raw.githubusercontent.com/chika0801/sing-box-examples/main/sing-box.service && systemctl daemon-reload
systemctl enable --now sing-box
| 项目 | |
|---|---|
| 程序 | /usr/local/bin/sing-box |
| 配置 | /root/sing-box_config.json |
| geoip | /root/geoip.db |
| geosite | /root/geosite.db |
| 热载 | systemctl reload sing-box |
| 重启 | systemctl restart sing-box |
| 状态 | systemctl status sing-box |
| 查看日志 | journalctl -u sing-box -o cat -e |
| 实时日志 | journalctl -u sing-box -o cat -f |
systemctl disable --now sing-box && rm -f /usr/local/bin/sing-box /root/sing-box_config.json /etc/systemd/system/sing-box.service
下载Android客户端程序SFA-arm64-v8a.apk。
参考客户端配置示例,按需修改后导入。
下载Windows客户端程序sing-box-windows-amd64.zip。
新建一个批处理文件,内容为:
start /min sing-box.exe run
参考客户端配置示例,按需修改后将文件名改为 config.json,与 sing-box.exe,批处理文件放在同一文件夹里。
右键点击 sing-box.exe 选择属性,选择兼容性,选择以管理员身份运行此程序,确定。
运行批处理文件,在弹出的用户账户控制对话框中,选择是。
307 followers · starred Feb 2025
238 followers · starred Jan 2024
9 followers · starred Nov 2023
34 followers · starred Apr 2026