- read UUID_CONFIRM from conf JSON via field-based awk -F '"' lookup and from nginx.conf location path segments via sed, avoiding {n} quantifier regex unsupported by BusyBox/Mawk; prevents a random UUID leaking into subscription links after changing UUID in -d
- hide the Hysteria2 Realm/port-hopping mutual-exclusion prompt in -l / -K / noninteractive installs where Realm defaults to off; keep it for interactive installs
- disable port hopping by default in menu "1. quick install" by dropping the 50000:51000 default, matching the -l path; an explicit --HY2_PORT_HOPPING_RANGE still enables it
fix: 修复 BusyBox 上 UUID/订阅错值,统一快速安装默认行为
- UUID_CONFIRM 提取改用 awk -F '"' 字段抓取 conf JSON,nginx.conf 用 sed 抓订阅 / WS 路径段兜底,避开 BusyBox/Mawk 不兼容的量词正则,修复 -d 改 UUID 后订阅链接出现随机 UUID
- -l / -K / 非交互安装默认 Realm 不启用,隐藏 Realm 与端口跳跃互斥提示;交互安装保留提示
- 菜单「1. 极速安装」去掉端口跳跃 50000:51000 默认值,改为默认关闭,与 -l 一致;显式传 --HY2_PORT_HOPPING_RANGE 仍可开启
- probe raw and github releases download domains in parallel in check_cdn, direct only when both reachable, verify proxies against both via wait -n
- add --tries=2 --timeout=10 to background binary and template downloads so blackholed connections fail fast instead of blocking the bare wait forever
- replace grep -oP in nginx_stop with grep -oE + cut so uninstall can stop nginx on Alpine
- drop grep --exclude in favor of awk FILENAME filtering
- replace pgrep with ps | grep in OpenRC template and clash_api reload guard
fix: 修复 IPv6-only 安装卡死与 Alpine BusyBox 兼容
- check_cdn 并行双域探测 raw 与 github releases 下载域,双域均可达才直连,代理经 wait -n 校验双域可用
- 后台二进制与订阅模板下载统一加 --tries=2 --timeout=10,黑洞连接快速失败,避免裸 wait 永久阻塞
- nginx_stop 的 grep -oP 改为 grep -oE + cut,修复 Alpine 卸载时无法停止 nginx
- grep --exclude 改用 awk FILENAME 排除
- OpenRC 模板与 clash_api 热更守卫的 pgrep 改用 ps | grep
- add independent (non-consecutive) per-protocol port editing in [sb -d], keeping the sequential start-port mode with preview confirmation
- sync port changes to the nginx reverse proxy and hot-reload them automatically
- accept an IP or a domain for the server address (DDNS-friendly for NAT VPS whose public IP changes daily), both during install and via [sb -d]
- switch port occupancy checks to strict matching so 1111 is no longer falsely treated as 11111
- stop treating a domain as an IPv6 stack in the ChatGPT unlock check, letting DNS use the system default stack
v1.3.20 feat: 新增各协议独立端口与域名服务器地址
- [sb -d] 支持为各协议设置独立(非连续)端口,保留开始端口顺序占用模式并直接预览确认
- 端口变更自动同步 nginx 反代并热加载
- 服务器地址支持填写 IP 或域名(NAT VPS 公网 IP 每日变化时可用 DDNS),新安装与 [sb -d] 修改均可
- 端口占用检测改为严格匹配,1111 不再误判 11111 占用
- ChatGPT 解锁检测不再将域名误判为 IPv6 栈,改由系统默认解析
- add idempotent nginx_sync to start, reload, or stop nginx based on the final config state
- start nginx automatically when adding WS + Argo protocols, removing the need for a manual systemctl restart
- regenerate the daemon file after the final nginx state is decided in change_protocols, keeping systemd ExecStartPre / OpenRC start_pre consistent and clearing stale OpenRC entries on Alpine after WS removal
- converge subscription toggle ON/OFF to daemon regeneration plus nginx_sync, replacing inline sed patches
- unify nginx management on CentOS7 with a tolerant ExecStartPre ("-" prefix) so nginx starts on reload and after reboot
- reload nginx after nginx.conf rewrites (port changes, Argo type changes, additional WS protocols)
- stop nginx during uninstall to cover processes started outside the service cgroup
fix: 热更流程下 nginx 与守护文件状态同步
- 新增幂等 nginx_sync,按最终配置状态自动启动 / 热重载 / 停止 nginx
- 添加 WS + Argo 协议时自动拉起 nginx,无需再手动 systemctl restart
- change_protocols 先确定最终 nginx 状态再生成守护文件,保证 systemd ExecStartPre / OpenRC start_pre 一致,并清除 Alpine 删除 WS 后残留的 start_pre
- 订阅开关 ON/OFF 收敛为守护文件重生成 + nginx_sync,移除内联 sed 补丁
- CentOS7 统一走带 "-" 容错的 ExecStartPre,reload 与重启后 nginx 均能拉起
- nginx.conf 被重写(改端口 / 换 Argo 隧道 / 追加 WS 协议)后自动 reload nginx
- 卸载时显式停止 nginx,覆盖服务 cgroup 外启动的进程
- allow installing with no inbounds at all, keeping only the base JSON; skip the protocol removal interaction and drop the REINSTALL=0 error
- ask for the node name again when re-adding protocols from a zero-protocol state, matching a fresh install
- clean up nginx / argo links after removing WS protocols: remove nginx config and stop the service when there is no subscription, keep fixed-tunnel argo and remove quick-tunnel argo
- reuse text 107 for the change_config guard and blank out unused E[73]/C[73], E[110]/C[110] entries
- remove dead code collect_exposed_ports and del_service_port_rule_ufw
feat: 支持完全无协议场景,精简空状态流程
- 允许一个 inbound 都没有的安装,仅保留基础配置 JSON;无协议时跳过删除交互并移除 REINSTALL=0 报错
- 0 协议状态下重新添加协议时重新询问节点名称,与全新安装一致
- 清空 WS 协议后联动处理 nginx / argo:无订阅时删除 nginx 配置并停止服务,固定隧道保留 argo,临时隧道删除 argo
- change_config 防御检查复用 text 107,清空不再使用的 E[73]/C[73]、E[110]/C[110] 条目
- 移除死代码 collect_exposed_ports 与 del_service_port_rule_ufw
- add real-time traffic stats via clash_api: total in/out shown in `sb -n` output and main menu status line
- inject `experimental.clash_api` into the base config, with a fallback patch plus SIGHUP reload for legacy configs and cleanup of stale `v2ray_api`
- add shared `find_free_port()` for both the nginx default port and the clash_api port, probing for unused ports within the script port range
- add `format_traffic()` and `ensure_stats_data()` helpers, fetching `/connections` with curl-first, wget fallback
- speed up the CDN status probe with HEAD requests and explicit timeouts in `get_code()`
v1.3.19 feat: 新增实时流量统计,加速优选地址探测
- 新增基于 clash_api 的实时流量统计:`sb -n` 输出与主菜单状态行展示总入站/出站流量
- 基础配置注入 `experimental.clash_api`,旧配置自动补全并 SIGHUP 热加载,同时清理残留的 `v2ray_api`
- 新增公共 `find_free_port()`,nginx 默认端口与 clash_api 端口共用,在脚本端口范围内探测未被占用的端口
- 新增 `format_traffic()` 与 `ensure_stats_data()` 辅助函数,优先 curl、wget 兜底拉取 `/connections` 数据
- 加速优选地址状态探测:`get_code()` 改用 HEAD 请求并显式设置超时
- Add bind_interface option in sb -d menu to bind outbound traffic to a specific NIC
- Change v2rayN Hysteria2 Realm config from Finalmask field to ProtoExtraObj
v1.3.16 feat: 支持指定网络出口,多网卡绑定
- sb -d 菜单新增「指定网络出口」选项,可为出站流量绑定特定网卡
- v2rayN 的 Hysteria2 Realm 配置从 Finalmask 字段改为 ProtoExtraObj
- add Armbian detection and mapping logic in system identification
- update error messages to include Armbian in supported systems
feat: 增加对 Armbian 系统的支持
- 在系统识别逻辑中添加对 Armbian 的检测与映射
- 更新错误提示信息,在支持系统中包含 Armbian
- parse preferred CDN input as host and optional port instead of treating the whole value as a single host
- support `IPv4 / IPv6 / domain` forms including bracketed IPv6 like `[addr]:port`
- persist CDN port for `vmess + ws` and `vless + ws + tls` config generation
- fall back to default ws ports when no port is provided: `80` for `vmess + ws` and `443` for `vless + ws + tls`
- update Clash, ShadowRocket, V2rayN, Throne, and sing-box exports to use the parsed host and port consistently
fix: 支持 ws 优选地址的 host:port 解析
- 将优选 CDN 输入解析为主机和可选端口,而不是把整串值当作单一主机
- 支持 `IPv4 / IPv6 / domain` 形式,包括 `[addr]:port` 这种带中括号的 IPv6
- 为 `vmess + ws` 和 `vless + ws + tls` 的配置生成持久化保存 CDN 端口
- 未显式填写端口时回退到默认 ws 端口:`vmess + ws` 为 `80`,`vless + ws + tls` 为 `443`
- 统一更新 Clash、ShadowRocket、V2rayN、Throne 和 sing-box 导出,确保都使用解析后的主机与端口
- Add support for enabling/disabling Hysteria2 port hopping and modifying port ranges after installation
- Allow customization of Hysteria2 upload/download bandwidth without reinstalling
- Enhance client configuration with proper Hysteria2 bandwidth (up/down) and port hopping parameters
- Improve port range input validation with automatic separator normalization
- Simplify menu option 9 description to "Change node configuration
增强 Hysteria2,支持安装后配置及客户端参数完善
- 支持安装后启用/禁用 Hysteria2 端口跳跃,并可修改端口范围
- 支持自定义 Hysteria2 上下行带宽,无需重新安装
- 完善客户端配置,补充 Hysteria2 上传/下载速率及端口跳跃参数
- 改进端口范围输入校验,自动规范分隔符格式
- 简化菜单选项 9 描述为“修改节点配置”
- Conditional Firewall Installation: Users who do not enable "Port Hopping" will no longer be forced to install firewall-related packages (e.g., iptables, firewalld) during initialization, reducing unnecessary system overhead.
- Improved Dependency Management: Reorganized the logic for checking and installing necessary software to ensure a smoother setup across different Linux distributions.
- Better Alpine Linux Support: Refined how the script handles specific tools like wget and service management on Alpine systems.
总结:优化依赖检测逻辑,并改进防火墙软件包的安装策略
- 按需安装防火墙: 对于不启用“端口跳跃”的用户,初始化时不再强制安装防火墙相关软件包(如 iptables、firewalld),减少系统冗余占用。
- 优化依赖安装:重构了必要软件的检测与安装逻辑,确保在不同 Linux 系统下运行更加顺畅。
- 增强 Alpine 系统适配:针对 Alpine 系统微调了工具检测和系统服务的处理方式,提升稳定性。
- fix cleanup exit flow by separating interrupt exit from normal exit
- add timeout fallback for CDN detection to prevent hanging
- Test GitHub CDN using `api.github.com`, and remove proxies that are unreachable.
重构: 提升稳定性
- 修复退出清理流程,分离中断退出与正常退出
- 为 CDN 检测增加超时回退,避免脚本卡死
- 测试 Github CDN 改为 api.github.com,去掉若干不能连接的代理
- Set `prefer_go: true` for the local DNS server to resolve issues where `systemd-resolved` might be unavailable or inaccessible on certain Linux distributions (e.g., Alpine Linux, lightweight Debian).
- Improve DNS resolution reliability by prioritizing Go's internal resolver over the system's C library or DBus interfaces.
功能:为本地 DNS 添加 prefer_go 选项并增强系统兼容性
- 为本地 (local) DNS 服务器设置 `prefer_go: true`,以解决在某些 Linux 发行版(如 Alpine Linux、精简版 Debian)上因缺少 `systemd-resolved` 服务而导致的解析失败或报错问题。
- 通过优先使用 Go 内置的解析器而非系统的 C 库或 DBus 接口,提升 DNS 解析的可靠性和一致性。
- Replace `${UUID}` with `${SIP022_PASSWORD}` in Clash configuration
- Ensure consistent SS password across all clients (ShadowRocket, V2rayN, NekoBox, Sing-box)
- Fix connection issues caused by inconsistent passwords
Security: Add pinnedPeerCertSha256 for Hy2/Trojan in v2rayN to prevent MITM (replaces AllowInsecure).
Compatibility: Refactor SFM/SFI/SFA configs for sing-box v1.13.0+.