sing-box 全家桶

1- 【Sing-box 全家桶】


2- 目录


2.1- 1.更新信息

2025.04.06 v1.2.16 Use OpenRC on Alpine to replace systemctl (Python3-compatible version); 在 Alpine 系统中使用 OpenRC 取代兼容 Python3 的 systemctl 实现

2025.04.05 v1.2.15 Supports output for clients such as Shadowrocket, Clash Mihomo, and Sing-box; 支持小火箭、Clash Mihomo、Sing-box 客户端输出

2025.03.23 v1.2.14 Added support for the AnyTLS protocol. Thanks to [Betterdoitnow] for providing the configuration; 新增对 AnyTLS 协议的支持,感谢 [Betterdoitnow] 提供的配置

历史更新 history(点击即可展开或收起)

2025.03.18 v1.2.13 Compatible with Sing-box 1.12.0-alpha.18+; 适配 Sing-box 1.12.0-alpha.18+

2025.01.31 v1.2.12 In order to prevent sing-box from upgrading to a certain version which may cause errors, add a mandatory version file; 以防止 sing-box 某个版本升级导致运行报错,增加强制指定版本号文件

2025.01.28 v1.2.11 1. Add server-side time synchronization configuration; 2. Replace some CDNs; 3. Fix the bug of getting the latest version error when upgrading; 1. 添加服务端时间同步配置; 2. 替换某些 CDN; 3. 修复升级时获取最新版本错误的 bu

2024.12.31 v1.2.10 Adapted v1.11.0-beta.17 to add port hopping for hysteria2 in sing-box client output; 适配 v1.11.0-beta.17,在 sing-box 客户端输出中添加 hysteria2 的端口跳跃

2024.12.29 v1.2.9 Refactored the chatGPT detection method based on lmc999’s detection and unlocking script; 根据 lmc999 的检测解锁脚本,重构了检测 chatGPT 方法

2024.12.10 v1.2.8 Thank you to the veteran player Fan Glider Fangliding for the technical guidance on Warp’s routing! 感谢资深玩家 风扇滑翔翼 Fangliding 关于 Warp 的分流的技术指导

2024.12.10 v1.2.7 Compatible with Sing-box 1.11.0-beta.8+. Thanks to the PR from brother Maxrxf. I’ve already given up myself; 适配 Sing-box 1.11.0-beta.8+,感谢 Maxrxf 兄弟的 PR,我自己已经投降的了

2024.10.28 v1.2.6 1. Fixed the bug that clash subscription failed when [-n] re-fetches the subscription; 2. vmess + ws encryption changed from none to auto; 3. Replaced a CDN; 1. 修复 [-n] 重新获取订阅时,clash 订阅失效的 bug; 2. vmess + ws 加密方式从 none 改为 auto; 3. 更换了一个 CDN

2024.08.06 v1.2.5 Add detection of TCP brutal. Sing-box will not use this module if not installed. 增加 TCP brutal 的检测,如果没有安装,Sing-box 将不使用该模块

2024.05.09 v1.2.4 Add hysteria2 port hopping. Supported Clients: ShadowRocket / NekoBox / Clash; 添加 hysteria2 的跳跃端口,支持客户端: ShadowRocket / NekoBox / Clash

2024.05.06 v1.2.3 Automatically detects native IPv4 and IPv6 for warp-installed machines to minimize interference with warp ip; 对于已安装 warp 机器,自动识别原生的 IPv4 和 IPv6,以减少受 warp ip 的干扰

2024.05.03 v1.2.2 Complete 8 non-interactive installation modes, direct output results. Suitable for mass installation scenarios. You can put the commands in the favorites of the ssh software. Please refer to the README.md description for details. 完善 8 种无交互安装模式,直接输出结果,适合大量装机的情景,可以把命令放在 ssh 软件的收藏夹,详细请参考 README.md 说明

2024.04.16 v1.2.1 1. Fix the bug of dynamically adding and removing protocols; 2. CentOS 7 add EPEL to install nginx; 1. 修复动态增加和删除协议的 bug; 2. CentOS 7 增加 EPEL 软件仓库,以便安装 Nginx

2024.04.12 v1.2.0 1. Add Cloudflare Argo Tunnel, so that 10 protocols, including the transport mode of ws, no longer need to bring our own domain; 2. Cloudflare Argo Tunnel supports try, Json and Token methods. Use of [sb -t] online switching; 3. Cloudflare Argo Tunnel switch is [sb -a], and the Sing-box switch is changed from [sb -o] to [sb -s]; 4. If Json or Token Argo is used, the subscription address is the domain name; 5. For details: https://github.com/fscarmen/sing-box; 1. 增加 Cloudflare Argo Tunnel,让包括传输方式为 ws 在内的 10 个协议均不再需要自带域名; 2. Cloudflare Argo Tunnel 支持临时、Json 和 Token 方式,支持使用 [sb -t] 在线切换; 3. Cloudflare Argo Tunnel 开关为 [sb -a],Sing-box 开关从 [sb -o] 更换为 [sb -s]; 4. 若使用 Json 或者 Token 固定域名 Argo,则订阅地址则使用该域名; 5. 详细参考: https://github.com/fscarmen/sing-box

2024.04.01 sing-box + argo container version is newly launched, for details: https://github.com/fscarmen/sing-box; sing-box 全家桶 + argo 容器版本全新上线,详细参考: https://github.com/fscarmen/sing-box

2024.03.27 v1.1.11 Add two non-interactive installation modes: 1. pass parameter; 2.kv file, for details: https://github.com/fscarmen/sing-box; 增加两个的无交互安装模式: 1. 传参;2.kv 文件,详细参考: https://github.com/fscarmen/sing-box

2024.03.26 v1.1.10 Thanks to UUb for the official change of the compilation, dependencies jq, qrencode from apt installation to download the binary file, reduce the installation time of about 15 seconds, the implementation of the project’s positioning of lightweight, as far as possible to install the least system dependencies; 感谢 UUb 兄弟的官改编译,依赖 jq, qrencode 从 apt 安装改为下载二进制文件,缩减安装时间约 15 秒,贯彻项目轻量化的定位,尽最大可能安装最少的系统依赖

2024.03.22 v1.1.9 1. In the Sing-box client, add the brutal field in the TCP protocol to make it effective; 2. Compatible with CentOS 7,8,9; 3. Remove default Github CDN; 1. 在 Sing-box 客户端,TCP 协议协议里加上 brutal 字段以生效; 2. 适配 CentOS 7,8,9; 3. 去掉默认的 Github 加速网

2024.3.18 v1.1.8 Move nginx for subscription services to the systemd daemon, following sing-box startup and shutdown; 把用于订阅服务的 nginx 移到 systemd daemon,跟随 sing-box 启停

2024.3.13 v1.1.7 Subscription made optional, no nginx and qrcode installed if not needed; 在线订阅改为可选项,如不需要,不安装 nginx 和 qrcode

2024.3.11 v1.1.6 1. Subscription api too many problems not working properly, instead put template-2 on Github; 2. Use native IP if it supports unlocking chatGPT, otherwise use warp chained proxy unlocking; 1. 在线转订阅 api 太多问题不能正常使用,改为把模板 2 放 Github; 2. 如自身支持解锁 chatGPT,则使用原生 IP,否则使用 warp 链式代理解锁

2024.3.10 v1.1.5 1. To protect node data security, use fake information to fetch subscribe api; 2. Adaptive the above clients. http://<server ip>:<nginx port>/<uuid>//<auto | auto2>; 1. 为保护节点数据安全,在 api 转订阅时,使用虚假信息; 2. 自适应以上的客户端,http://<server ip>:<nginx port>/<uuid>/<auto | auto2>

2024.3.4 v1.1.4 1. Support V2rayN / Nekobox / Clash / sing-box / Shadowrocket subscribe. http://<server ip>:<nginx port>/<uuid>/<qr | clash | neko | proxies | shadowrocket | sing-box-pc | sing-box-phone | v2rayn>. Index of all subscribes: http://<server ip>:<nginx port>/<uuid>/ . Reinstall is required; 2. Adaptive the above clients. http://<server ip>:<nginx port>/<uuid>/auto ; 1. 增加 V2rayN / Nekobox / Clash / sing-box / Shadowrocket 订阅,http://<server ip>:<nginx port>/<uuid>/<qr | clash | neko | proxies | shadowrocket | sing-box-pc | sing-box-phone | v2rayn>, 所有订阅的索引: http://<server ip>:<nginx port>/<uuid>/,需要重新安装; 2. 自适应以上的客户端,http://<server ip>:<nginx port>/<uuid>/auto

2024.2.16 v1.1.3 1. Support v2rayN V6.33 Tuic and Hysteria2 protocol URLs; 2. Add DNS module to adapt Sing-box V1.9.0-alpha.8; 3. Reconstruct the installation protocol, add delete protocols and protocol export module, each parameter is more refined. ( Reinstall is required ); 4. Remove obfs obfuscation from Hysteria2; 1. 支持 v2rayN V6.33 Tuic 和 Hysteria2 协议 URL; 2. 增加 DNS 模块以适配 Sing-box V1.9.0-alpha.8; 3. 重构安装协议,增加删除协议及协议输出模块,各参数更精细 (需要重新安装); 4. 去掉 Hysteria2 的 obfs 混淆

2023.12.25 v1.1.2 1. support Sing-box 1.8.0 latest Rule Set and Experimental; 2. api.openai.com routes to WARP IPv4, other openai websites routes to WARP IPv6; 3. Start port changes to 100; 1. 支持 Sing-box 1.8.0 最新的 Rule Set 和 Experimental; 2. api.openai.com 分流到 WARP IPv4, 其他 openai 网站分流到 WARP IPv6; 3. 开始端口改为 100

2023.11.21 v1.1.1 1. XTLS + REALITY remove flow: xtls-reality-vision to support multiplexing and TCP brutal (requires reinstallation); 2. Clash meta add multiplexing parameter. 1. XTLS + REALITY 去掉 xtls-reality-vision 流控以支持多路复用和 TCP brutal (需要重新安装); 2. Clash meta 增加多路复用参数

2023.11.17 v1.1.0 1. Add [ H2 + Reality ] and [ gRPC + Reality ]. Reinstall is required; 2. Use beta version instead of alpha; 3. Support TCP brutal and add the official install script; 1. 增加 [ H2 + Reality ] 和 [ gRPC + Reality ],需要重新安装; 2. 由于 Sing-box 更新极快,将使用 beta 版本替代 alpha 3. 支持 TCP brutal,并提供官方安装脚本

2023.11.15 v1.0.1 1. Support TCP brutal. Reinstall is required; 2. Use alpha version instead of latest; 3. Change the default CDN to [ cn.azhz.eu.org ]; 1. 支持 TCP brutal,需要重新安装; 2. 由于 Sing-box 更新极快,将使用 alpha 版本替代 latest; 3. 默认优选改为 [ cn.azhz.eu.org ]

2023.10.29 v1.0 正式版 1. Sing-box Family bucket v1.0; 2. After installing, add [sb] shortcut; 3. Output the configuration for Sing-box Client; 1. Sing-box 全家桶 v1.0; 2. 安装后,增加 [sb] 的快捷运行方式; 3. 输出 Sing-box Client 配置

2023.10.18 beta7 1. You can add and remove protocols at any time, need to reinstall script; 2. Adjusted the order of some protocols; 1. 可以随时添加和删除协议,需要重新安装脚本; 2. 调整了部分协议的先后顺序

2023.10.16 beta6 1. Support Alpine; 2. Add Sing-box PID, runtime, and memory usage to the menu; 3. Remove the option of using warp on returning to China; 支持 Alpine; 2. 菜单中增加 sing-box 内存占用显示; 3. 去掉使用 warp 回国的选项

2023.10.10 beta5 1. Add the option of blocking on returning to China; 2. Add a number of quality cdn’s that are collected online; 1. 增加禁止归国选项; 2. 增加线上收录的若干优质 cdn

2023.10.9 beta4 1. Add v2rayN client, ShadowTLS and Tuic based on sing-box kernel configuration file output; 2. Shadowsocks encryption from aes-256-gcm to aes-128-gcm; 3. Optimize the routing and dns of sing-box on the server side; 1. 补充 v2rayN 客户端中,ShadowTLS 和 Tuic 基于 sing-box 内核的配置文件输出; 2. Shadowsocks 加密从 aes-256-gcm 改为 aes-128-gcm; 3. 优化服务端 sing-box 的 路由和 dns

2023.10.6 beta3 1. Add vmess + ws / vless + ws + tls protocols; 2. Hysteria2 add obfuscated verification of obfs; 1. 增加 vmess + ws / vless + ws + tls 协议; 2. Hysteria2 增加 obfs 混淆验证

2023.10.3 beta2 1. Single-select, multi-select or select all the required protocols; 2. Support according to the order of selection, the definition of the corresponding protocol listen port number; 1. 可以单选、多选或全选需要的协议; 2. 支持根据选择的先后次序,定义相应协议监听端口号

2023.9.30 beta1 Sing-box 全家桶一键脚本 for vps

2.2- 2.项目特点

  • 一键部署多协议,可以单选、多选或全选 ShadowTLS v3 / XTLS Reality / Hysteria2 / Tuic V5 / ShadowSocks / Trojan / Vmess + ws / Vless + ws + tls / H2 Reality / gRPC Reality / AnyTLS, 总有一款适合你
  • 所有协议均不需要域名,可选 Cloudflare Argo Tunnel 内网穿透以支持传统方式为 websocket 的协议
  • 节点信息输出到 V2rayN / Clash Verge / 小火箭 / Nekobox / Sing-box (SFI, SFA, SFM),订阅自动适配客户端,一个订阅 url 走天下
  • 自定义端口,适合有限开放端口的 nat 小鸡
  • 内置 warp 链式代理解锁 chatGPT
  • 智能判断操作系统: Ubuntu 、Debian 、CentOS 、Alpine 和 Arch Linux,请务必选择 LTS 系统
  • 支持硬件结构类型: AMD 和 ARM,支持 IPv4 和 IPv6
  • 无交互极速安排模式: 一个回车完成 11 个协议的安装

2.3- 3.Sing-box for VPS 运行脚本

  • 首次运行
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh)
  • 再次运行
sb
Option 参数 Remark 备注
-c Chinese 中文
-e English 英文
-u Uninstall 卸载
-n Export Nodes list 显示节点信息
-p Change the nodes start port 更改节点的起始端口
-s Stop / Start the Sing-box service 停止/开启 Sing-box 服务
-a Stop / Start the Argo Tunnel service 停止/开启 Argo Tunnel 服务
-v Sync Argo Xray to the newest 同步 Argo Xray 到最新版本
-b Upgrade kernel, turn on BBR, change Linux system 升级内核、安装 BBR、DD 脚本
-r Add and remove protocols 添加和删除协议

2.4- 4.无交互极速安装

2.4.1- 方式 1. KV 配置文件,内容参照本库里的 config

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) -f config.conf

2.4.2- 方式 2. KV 传参,举例

使用 Origin Rule + 订阅(点击即可展开或收起)
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) \
  --LANGUAGE c \
  --CHOOSE_PROTOCOLS a \
  --START_PORT 8881 \
  --PORT_NGINX 60000 \
  --SERVER_IP 123.123.123.123 \
  --CDN skk.moe\
  --VMESS_HOST_DOMAIN vmess.test.com \
  --VLESS_HOST_DOMAIN vless.test.com \
  --UUID_CONFIRM 20f7fca4-86e5-4ddf-9eed-24142073d197 \
  --SUBSCRIBE=true \
  --PORT_HOPPING_RANGE 50000:51000 \
  --NODE_NAME_CONFIRM bucket
使用 Origin Rule ,不要订阅(点击即可展开或收起)
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) \
  --LANGUAGE c \
  --CHOOSE_PROTOCOLS a \
  --START_PORT 8881 \
  --PORT_NGINX 60000 \
  --SERVER_IP 123.123.123.123 \
  --CDN skk.moe\
  --VMESS_HOST_DOMAIN vmess.test.com \
  --VLESS_HOST_DOMAIN vless.test.com \
  --UUID_CONFIRM 20f7fca4-86e5-4ddf-9eed-24142073d197 \
  --PORT_HOPPING_RANGE 50000:51000 \
  --NODE_NAME_CONFIRM bucket
使用 Argo 临时隧道 + 订阅(点击即可展开或收起)
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) \
  --LANGUAGE c \
  --CHOOSE_PROTOCOLS a \
  --START_PORT 8881 \
  --PORT_NGINX 60000 \
  --SERVER_IP 123.123.123.123 \
  --CDN skk.moe\
  --UUID_CONFIRM 20f7fca4-86e5-4ddf-9eed-24142073d197 \
  --SUBSCRIBE=true \
  --ARGO=true \
  --PORT_HOPPING_RANGE 50000:51000 \
  --NODE_NAME_CONFIRM bucket
使用 Argo 临时隧道,不要订阅(点击即可展开或收起)
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) \
  --LANGUAGE c \
  --CHOOSE_PROTOCOLS a \
  --START_PORT 8881 \
  --PORT_NGINX 60000 \
  --SERVER_IP 123.123.123.123 \
  --CDN skk.moe\
  --UUID_CONFIRM 20f7fca4-86e5-4ddf-9eed-24142073d197 \
  --ARGO=true \
  --PORT_HOPPING_RANGE 50000:51000 \
  --NODE_NAME_CONFIRM bucket
使用 Argo Json 隧道 + 订阅(点击即可展开或收起)
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) \
  --LANGUAGE c \
  --CHOOSE_PROTOCOLS a \
  --START_PORT 8881 \
  --PORT_NGINX 60000 \
  --SERVER_IP 123.123.123.123 \
  --CDN skk.moe\
  --UUID_CONFIRM 20f7fca4-86e5-4ddf-9eed-24142073d197 \
  --SUBSCRIBE=true \
  --ARGO=true \
  --ARGO_DOMAIN=sb.argo.com \
  --ARGO_AUTH='{"AccountTag":"9cc9e3e4d8f29d2a02e297f14f20513a","TunnelSecret":"6AYfKBOoNlPiTAuWg64ZwujsNuERpWLm6pPJ2qpN8PM=","TunnelID":"1ac55430-f4dc-47d5-a850-bdce824c4101"}' \
  --PORT_HOPPING_RANGE 50000:51000 \
  --NODE_NAME_CONFIRM bucket
使用 Argo Json 隧道,不要订阅(点击即可展开或收起)
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) \
  --LANGUAGE c \
  --CHOOSE_PROTOCOLS a \
  --START_PORT 8881 \
  --PORT_NGINX 60000 \
  --SERVER_IP 123.123.123.123 \
  --CDN skk.moe\
  --UUID_CONFIRM 20f7fca4-86e5-4ddf-9eed-24142073d197 \
  --ARGO=true \
  --ARGO_DOMAIN=sb.argo.com \
  --ARGO_AUTH='{"AccountTag":"9cc9e3e4d8f29d2a02e297f14f20513a","TunnelSecret":"6AYfKBOoNlPiTAuWg64ZwujsNuERpWLm6pPJ2qpN8PM=","TunnelID":"1ac55430-f4dc-47d5-a850-bdce824c4101"}' \
  --PORT_HOPPING_RANGE 50000:51000 \
  --NODE_NAME_CONFIRM bucket
使用 Argo Token 隧道 + 订阅(点击即可展开或收起)
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) \
  --LANGUAGE c \
  --CHOOSE_PROTOCOLS a \
  --START_PORT 8881 \
  --PORT_NGINX 60000 \
  --SERVER_IP 123.123.123.123 \
  --CDN skk.moe\
  --UUID_CONFIRM 20f7fca4-86e5-4ddf-9eed-24142073d197 \
  --SUBSCRIBE=true \
  --ARGO=true \
  --ARGO_DOMAIN=sb.argo.com \
  --ARGO_AUTH='sudo cloudflared service install eyJhIjoiOWNjOWUzZTRkOGYyOWQyYTAyZTI5N2YxNGYyMDUxM2EiLCJ0IjoiOGNiZDA4ZjItNGM0MC00OGY1LTlmZDYtZjlmMWQ0YTcxMjUyIiwicyI6IllXWTFORGN4TW1ZdE5HTXdZUzAwT0RaakxUbGxNMkl0Wm1VMk5URTFOR0l4TkdKayJ9' \
  --PORT_HOPPING_RANGE 50000:51000 \
  --NODE_NAME_CONFIRM bucket
使用 Argo Token 隧道,不要订阅(点击即可展开或收起)
bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-box.sh) \
  --LANGUAGE c \
  --CHOOSE_PROTOCOLS a \
  --START_PORT 8881 \
  --PORT_NGINX 60000 \
  --SERVER_IP 123.123.123.123 \
  --CDN skk.moe\
  --UUID_CONFIRM 20f7fca4-86e5-4ddf-9eed-24142073d197 \
  --ARGO=true \
  --ARGO_DOMAIN=sb.argo.com \
  --ARGO_AUTH='sudo cloudflared service install eyJhIjoiOWNjOWUzZTRkOGYyOWQyYTAyZTI5N2YxNGYyMDUxM2EiLCJ0IjoiOGNiZDA4ZjItNGM0MC00OGY1LTlmZDYtZjlmMWQ0YTcxMjUyIiwicyI6IllXWTFORGN4TW1ZdE5HTXdZUzAwT0RaakxUbGxNMkl0Wm1VMk5URTFOR0l4TkdKayJ9' \
  --PORT_HOPPING_RANGE 50000:51000 \
  --NODE_NAME_CONFIRM bucket

2.4.3- 参数说明

Key 大小写不敏感(Case Insensitive) Value
–LANGUAGE c=中文; e=英文
–CHOOSE_PROTOCOLS 可多选,如 bcdfk
a=全部
b=XTLS + reality
c=hysteria2
d=tuic
e=ShadowTLS
f=shadowsocks
g=trojan
h=vmess + ws
i=vless + ws + tls
j=H2 + reality
k=gRPC + reality
l=AnyTLS
–START_PORT 100 - 65520
–PORT_NGINX n=不需要订阅,或者 100 - 65520
–SERVER_IP IPv4 或 IPv6 地址,不需要中括号
–CDN 优选 IP 或者域名,如 --CHOOSE_PROTOCOLS 是 [a,h,i] 时需要
–VMESS_HOST_DOMAIN vmess sni 域名,如 --CHOOSE_PROTOCOLS 是 [a,h] 时需要
–VLESS_HOST_DOMAIN vless sni 域名,如 --CHOOSE_PROTOCOLS 是 [a,i] 时需要
–UUID_CONFIRM 协议的 uuid 或者 password
–ARGO 是否使用 Argo Tunnel,如果是填 true,如果使用 Origin rules,则可以忽略本 Key
–ARGO_DOMAIN 固定 Argo 域名,即是 Json 或者 Token 隧道的域名
–ARGO_AUTH Json 或者 Token 隧道的内容
–PORT_HOPPING_RANGE hysteria2 跳跃端口范围,如 50000:51000
–NODE_NAME_CONFIRM 节点名

2.5- 5.Token Argo Tunnel 方案设置任意端口回源以使用 cdn

详细教程: 群晖套件:Cloudflare Tunnel 内网穿透中文教程 支持DSM6、7

image image

2.6- 6.Vmess / Vless 方案设置任意端口回源以使用 cdn

举例子 IPv6: vmess [2a01:4f8:272:3ae6:100b:ee7a:ad2