From 2246c1ed3bd1df890e050e1c3118e6b227ce46c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Wed, 25 Mar 2026 23:11:32 +0800 Subject: [PATCH 01/22] Enhance Argo tunnel setup for Alpine OS Add support for Alpine OS in Argo tunnel setup and update crontab for tunnel execution. --- sb.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sb.sh b/sb.sh index 1514677..1e38928 100644 --- a/sb.sh +++ b/sb.sh @@ -2470,11 +2470,27 @@ if [[ -n $(curl -sL https://$(cat /etc/s-box/argo.log 2>/dev/null | grep -a tryc argo=$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}') sbshare > /dev/null 2>&1 blue "Argo临时隧道申请成功,域名验证有效:$argo" && sleep 2 + + +if [[ x"${release}" == x"alpine" ]]; then +cat > /etc/local.d/alpineyg.start <<'EOF' +#!/bin/sh +sleep 10 +nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & +sleep 10 +printf "9\n1\n" | bash /usr/bin/sb > /dev/null 2>&1 +EOF +chmod +x /etc/local.d/alpineyg.start +rc-update add local default +else crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/sbargopid/d' /tmp/crontab.tmp echo '@reboot sleep 10 && /bin/bash -c "nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & pid=\$! && echo \$pid > /etc/s-box/sbargopid.log && sleep 5 && printf \"9\n1\n\" | bash /usr/bin/sb > /dev/null 2>&1"' >> /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp +fi + + else yellow "Argo临时域名验证暂不可用,请稍后再试" fi From a59b185460bd998fe8a8ae71f6660bec0b7b9268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 08:57:57 +0800 Subject: [PATCH 02/22] Update sb.sh --- sb.sh | 55 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/sb.sh b/sb.sh index 1e38928..23229cd 100644 --- a/sb.sh +++ b/sb.sh @@ -63,7 +63,7 @@ if [ ! -f sbyg_update ]; then green "首次安装Sing-box-yg脚本必要的依赖……" if [[ x"${release}" == x"alpine" ]]; then apk update -apk add libc6-compat jq openssl procps busybox-extras iproute2 iputils coreutils expect git socat iptables grep tar tzdata util-linux +apk add bash libc6-compat jq openssl procps busybox-extras iproute2 iputils coreutils expect git socat iptables grep tar tzdata util-linux apk add virt-what else if [[ $release = Centos && ${vsid} =~ 8 ]]; then @@ -2470,17 +2470,15 @@ if [[ -n $(curl -sL https://$(cat /etc/s-box/argo.log 2>/dev/null | grep -a tryc argo=$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}') sbshare > /dev/null 2>&1 blue "Argo临时隧道申请成功,域名验证有效:$argo" && sleep 2 - - if [[ x"${release}" == x"alpine" ]]; then -cat > /etc/local.d/alpineyg.start <<'EOF' -#!/bin/sh +cat > /etc/local.d/alpineargo.start <<'EOF' +#!/bin/bash sleep 10 nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & sleep 10 printf "9\n1\n" | bash /usr/bin/sb > /dev/null 2>&1 EOF -chmod +x /etc/local.d/alpineyg.start +chmod +x /etc/local.d/alpineargo.start rc-update add local default else crontab -l 2>/dev/null > /tmp/crontab.tmp @@ -2489,8 +2487,6 @@ echo '@reboot sleep 10 && /bin/bash -c "nohup /etc/s-box/cloudflared tunnel --ur crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp fi - - else yellow "Argo临时域名验证暂不可用,请稍后再试" fi @@ -3148,15 +3144,21 @@ busybox httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/web > / fi echo "$!" > /etc/s-box/subcmsbid.log sleep 5 +if [[ x"${release}" == x"alpine" ]]; then +cat > /etc/local.d/alpinesub.start <<'EOF' +#!/bin/bash +sleep 10 +busybox-extras httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & +EOF +chmod +x /etc/local.d/alpinesub.start +rc-update add local default +else crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/subcmsbid/d' /tmp/crontab.tmp -if [[ x"${release}" == x"alpine" ]]; then -echo '@reboot sleep 10 && /bin/bash -c "busybox-extras httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & pid=\$! && echo \$pid > /etc/s-box/subcmsbid.log"' >> /tmp/crontab.tmp -else echo '@reboot sleep 10 && /bin/bash -c "busybox httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & pid=\$! && echo \$pid > /etc/s-box/subcmsbid.log"' >> /tmp/crontab.tmp -fi crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp +fi sbshare > /dev/null 2>&1 sleep 1 && green "本地IP订阅链接已更新完成" && sleep 3 && sb } @@ -4169,6 +4171,23 @@ sed -i '/sbwpphid.log/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp } +aplws5(){ +if [[ x"${release}" == x"alpine" ]]; then +cat > /etc/local.d/alpinews5.start <<'EOF' +#!/bin/bash +sleep 10 +nohup $(cat /etc/s-box/sbwpph.log 2>/dev/null) +EOF +chmod +x /etc/local.d/alpinews5.start +rc-update add local default +else +crontab -l 2>/dev/null > /tmp/crontab.tmp +sed -i '/sbwpphid.log/d' /tmp/crontab.tmp +echo '@reboot sleep 10 && /bin/bash -c "nohup $(cat /etc/s-box/sbwpph.log 2>/dev/null) & pid=\$! && echo \$pid > /etc/s-box/sbwpphid.log"' >> /tmp/crontab.tmp +crontab /tmp/crontab.tmp >/dev/null 2>&1 +rm /tmp/crontab.tmp +fi +} echo yellow "1:重置启用WARP-plus-Socks5本地Warp代理模式" yellow "2:重置启用WARP-plus-Socks5多地区Psiphon代理模式" @@ -4185,11 +4204,7 @@ if [[ -z $resv1 && -z $resv2 ]]; then red "WARP-plus-Socks5的IP获取失败" && unins && exit else echo "/etc/s-box/sbwpph -b 127.0.0.1:$port --gool -$sw46 --endpoint 162.159.192.1:2408 >/dev/null 2>&1" > /etc/s-box/sbwpph.log -crontab -l 2>/dev/null > /tmp/crontab.tmp -sed -i '/sbwpphid.log/d' /tmp/crontab.tmp -echo '@reboot sleep 10 && /bin/bash -c "nohup $(cat /etc/s-box/sbwpph.log 2>/dev/null) & pid=\$! && echo \$pid > /etc/s-box/sbwpphid.log"' >> /tmp/crontab.tmp -crontab /tmp/crontab.tmp >/dev/null 2>&1 -rm /tmp/crontab.tmp +aplws5 green "WARP-plus-Socks5的IP获取成功,可进行Socks5代理分流" fi elif [ "$menu" = "2" ]; then @@ -4237,11 +4252,7 @@ if [[ -z $resv1 && -z $resv2 ]]; then red "WARP-plus-Socks5的IP获取失败,尝试换个国家地区吧" && unins && exit else echo "/etc/s-box/sbwpph -b 127.0.0.1:$port --cfon --country $guojia -$sw46 --endpoint 162.159.192.1:2408 >/dev/null 2>&1" > /etc/s-box/sbwpph.log -crontab -l 2>/dev/null > /tmp/crontab.tmp -sed -i '/sbwpphid.log/d' /tmp/crontab.tmp -echo '@reboot sleep 10 && /bin/bash -c "nohup $(cat /etc/s-box/sbwpph.log 2>/dev/null) & pid=\$! && echo \$pid > /etc/s-box/sbwpphid.log"' >> /tmp/crontab.tmp -crontab /tmp/crontab.tmp >/dev/null 2>&1 -rm /tmp/crontab.tmp +aplws5 green "WARP-plus-Socks5的IP获取成功,可进行Socks5代理分流" fi elif [ "$menu" = "3" ]; then From 1622175dbb1cd7b40310617c67d376cd2e829a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:15:44 +0800 Subject: [PATCH 03/22] Update sb.sh --- sb.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sb.sh b/sb.sh index 23229cd..cb5e481 100644 --- a/sb.sh +++ b/sb.sh @@ -2497,6 +2497,7 @@ sed -i '/sbargopid/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp rm -rf /etc/s-box/vm_ws_argols.txt +rm -rf /etc/local.d/alpineargo.start sbshare > /dev/null 2>&1 green "Argo临时隧道已停止" else @@ -3126,6 +3127,7 @@ sed -i '/subcmsbid/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp rm -rf /root/web /etc/s-box/subcmsbid.log +rm -rf /etc/local.d/alpinesub.start green "本地IP订阅链接已卸载完成" && sleep 3 && exit else changeserv @@ -3897,6 +3899,7 @@ kill -15 $(cat /etc/s-box/sbargopid.log 2>/dev/null) >/dev/null 2>&1 kill -15 $(cat /etc/s-box/sbwpphid.log 2>/dev/null) >/dev/null 2>&1 kill -15 $(cat /etc/s-box/subcmsbid.log 2>/dev/null) >/dev/null 2>&1 rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/web +rm -f /etc/local.d/alpineargo.start /etc/local.d/alpinesub.start /etc/local.d/alpinews5.start uncronsb iptables -t nat -F PREROUTING >/dev/null 2>&1 netfilter-persistent save >/dev/null 2>&1 @@ -4170,6 +4173,7 @@ crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/sbwpphid.log/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp +rm -rf /etc/local.d/alpinews5.start } aplws5(){ if [[ x"${release}" == x"alpine" ]]; then From 4579e4c8e221df0b352c1ccbdd4c6d7aa62b8c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:31:08 +0800 Subject: [PATCH 04/22] Update sb.sh --- sb.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/sb.sh b/sb.sh index cb5e481..f16330f 100644 --- a/sb.sh +++ b/sb.sh @@ -1,5 +1,4 @@ #!/bin/bash -export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export LANG=en_US.UTF-8 red='\033[0;31m' green='\033[0;32m' From 34274032eaab7d80810c4e8ba8b7545ed63a98ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:03:52 +0800 Subject: [PATCH 05/22] Update sb.sh --- sb.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sb.sh b/sb.sh index f16330f..3ecae9f 100644 --- a/sb.sh +++ b/sb.sh @@ -33,6 +33,7 @@ release="Centos" else red "脚本不支持当前的系统,请选择使用Ubuntu,Debian,Centos系统。" && exit fi +export release export sbfiles="/etc/s-box/sb10.json /etc/s-box/sb11.json /etc/s-box/sb.json" export sbnh=$(/etc/s-box/sing-box version 2>/dev/null | awk '/version/{print $NF}' | cut -d '.' -f 1,2) vsid=$(grep -i version_id /etc/os-release | cut -d \" -f2 | cut -d . -f1) From 079f9611b8d7d6948cfc51e818e2e884408234ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:12:29 +0800 Subject: [PATCH 06/22] Refactor Alpine checks to use command -v --- sb.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sb.sh b/sb.sh index 3ecae9f..3d426d0 100644 --- a/sb.sh +++ b/sb.sh @@ -61,7 +61,7 @@ hostname=$(hostname) if [ ! -f sbyg_update ]; then green "首次安装Sing-box-yg脚本必要的依赖……" -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then apk update apk add bash libc6-compat jq openssl procps busybox-extras iproute2 iputils coreutils expect git socat iptables grep tar tzdata util-linux apk add virt-what @@ -880,7 +880,7 @@ cp /etc/s-box/sb${num}.json /etc/s-box/sb.json } sbservice(){ -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then echo '#!/sbin/openrc-run description="sing-box service" command="/etc/s-box/sing-box" @@ -915,7 +915,7 @@ fi } ipuuid(){ -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then status_cmd="rc-service sing-box status" status_pattern="started" else @@ -2470,7 +2470,7 @@ if [[ -n $(curl -sL https://$(cat /etc/s-box/argo.log 2>/dev/null | grep -a tryc argo=$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}') sbshare > /dev/null 2>&1 blue "Argo临时隧道申请成功,域名验证有效:$argo" && sleep 2 -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then cat > /etc/local.d/alpineargo.start <<'EOF' #!/bin/bash sleep 10 @@ -3139,14 +3139,14 @@ mkdir -p /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)" ln -sf /etc/s-box/clmi.yaml /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/clmi.yaml ln -sf /etc/s-box/sbox.json /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/sbox.json ln -sf /etc/s-box/jhsub.txt /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/jhsub.txt -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then busybox-extras httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/web > /dev/null 2>&1 & else busybox httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/web > /dev/null 2>&1 & fi echo "$!" > /etc/s-box/subcmsbid.log sleep 5 -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then cat > /etc/local.d/alpinesub.start <<'EOF' #!/bin/bash sleep 10 @@ -3762,7 +3762,7 @@ fi } restartsb(){ -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then rc-service sing-box restart else systemctl enable sing-box @@ -3781,7 +3781,7 @@ restartsb sbactive green "Sing-box服务已重启\n" && sleep 3 && sb elif [ "$menu" = "2" ]; then -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then rc-service sing-box stop else systemctl stop sing-box @@ -3882,7 +3882,7 @@ fi } unins(){ -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then for svc in sing-box argo; do rc-service "$svc" stop >/dev/null 2>&1 rc-update del "$svc" default >/dev/null 2>&1 @@ -3911,7 +3911,7 @@ echo sblog(){ red "退出日志 Ctrl+c" -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then yellow "暂不支持alpine查看日志" else #systemctl status sing-box @@ -4176,7 +4176,7 @@ rm /tmp/crontab.tmp rm -rf /etc/local.d/alpinews5.start } aplws5(){ -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then cat > /etc/local.d/alpinews5.start <<'EOF' #!/bin/bash sleep 10 @@ -4408,7 +4408,7 @@ v4_6="仅IPV6出站($showv6)" fi echo -e "代理IP优先级:$blue$v4_6$plain" fi -if [[ x"${release}" == x"alpine" ]]; then +if command -v apk >/dev/null 2>&1; then status_cmd="rc-service sing-box status" status_pattern="started" else From 957f8aef6fa72c85a9f3a3ce510d83874f0f4a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:21:29 +0800 Subject: [PATCH 07/22] Update sb.sh --- sb.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sb.sh b/sb.sh index 3d426d0..557e1a8 100644 --- a/sb.sh +++ b/sb.sh @@ -2479,7 +2479,7 @@ sleep 10 printf "9\n1\n" | bash /usr/bin/sb > /dev/null 2>&1 EOF chmod +x /etc/local.d/alpineargo.start -rc-update add local default +rc-update add local default >/dev/null 2>&1 else crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/sbargopid/d' /tmp/crontab.tmp @@ -3153,7 +3153,7 @@ sleep 10 busybox-extras httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & EOF chmod +x /etc/local.d/alpinesub.start -rc-update add local default +rc-update add local default >/dev/null 2>&1 else crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/subcmsbid/d' /tmp/crontab.tmp @@ -4183,7 +4183,7 @@ sleep 10 nohup $(cat /etc/s-box/sbwpph.log 2>/dev/null) EOF chmod +x /etc/local.d/alpinews5.start -rc-update add local default +rc-update add local default >/dev/null 2>&1 else crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/sbwpphid.log/d' /tmp/crontab.tmp From 0996bfb716615abbdb2411fc626785b52b56d09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:57:43 +0800 Subject: [PATCH 08/22] Update sb.sh --- sb.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sb.sh b/sb.sh index 557e1a8..4b2a40a 100644 --- a/sb.sh +++ b/sb.sh @@ -1102,8 +1102,8 @@ echo resvmess(){ if [[ "$tls" = "false" ]]; then -argopid -if ps -p "$ls" >/dev/null 2>&1; then + +if ps -ef 2>/dev/null | grep -q '[c]loudflared.*url'; then echo white "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" red "🚀【 vmess-ws(tls)+Argo 】临时节点信息如下(可选择3-8-3,自定义CDN优选地址):" && sleep 2 @@ -1597,8 +1597,8 @@ EOF } tls=$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].tls.enabled') -argopid -if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -p "$ls" >/dev/null 2>&1 && [ "$tls" = "false" ]; then + +if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep -q '[c]loudflared.*url' && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' && ps -p "$ls" >/dev/null 2>&1 && [ "$tls" = "false" ]; then +elif ! ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep -q '[c]loudflared.*url' && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' && ! ps -p "$ls" >/dev/null 2>&1 && [ "$tls" = "false" ]; then +elif ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ! ps -ef 2>/dev/null | grep -q '[c]loudflared.*url' && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' || ps -p "$ls" >/dev/null 2>&1; then +if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' || ps -ef 2>/dev/null | grep -q '[c]loudflared.*url'; then vm_zs="TLS关闭" argoym="已开启" else @@ -4056,7 +4056,7 @@ fi if [ "$argoym" = "已开启" ]; then #echo -e "Vmess-UUID:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[0].users[0].uuid')${plain}" #echo -e "Vmess-Path:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].transport.path')${plain}" -if ps -p "$ls" >/dev/null 2>&1; then +if ps -ef 2>/dev/null | grep -q '[c]loudflared.*url'; then echo -e "Argo临时域名:${yellow}$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}')${plain}" fi if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run'; then From bf111cafc99d530dead5b43e36d4a757114c5569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:14:16 +0800 Subject: [PATCH 09/22] Update sb.sh --- sb.sh | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/sb.sh b/sb.sh index 4b2a40a..f6ec61a 100644 --- a/sb.sh +++ b/sb.sh @@ -173,10 +173,6 @@ systemctl start warp-go >/dev/null 2>&1 fi } -argopid(){ -ls=$(cat /etc/s-box/sbargopid.log 2>/dev/null) -} - close(){ systemctl stop firewalld.service >/dev/null 2>&1 systemctl disable firewalld.service >/dev/null 2>&1 @@ -2460,11 +2456,8 @@ readp "请选择【0-2】:" menu if [ "$menu" = "1" ]; then green "请稍等……" cloudflaredargo -if [[ -n $(ps -e | grep cloudflared) ]]; then -kill -15 $(cat /etc/s-box/sbargopid.log 2>/dev/null) >/dev/null 2>&1 -fi +ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & -echo "$!" > /etc/s-box/sbargopid.log sleep 20 if [[ -n $(curl -sL https://$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}')/ -I | awk 'NR==1 && /404|400|503/') ]]; then argo=$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}') @@ -2482,8 +2475,7 @@ chmod +x /etc/local.d/alpineargo.start rc-update add local default >/dev/null 2>&1 else crontab -l 2>/dev/null > /tmp/crontab.tmp -sed -i '/sbargopid/d' /tmp/crontab.tmp -echo '@reboot sleep 10 && /bin/bash -c "nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & pid=\$! && echo \$pid > /etc/s-box/sbargopid.log && sleep 5 && printf \"9\n1\n\" | bash /usr/bin/sb > /dev/null 2>&1"' >> /tmp/crontab.tmp +echo '@reboot sleep 10 && /bin/bash -c "nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & sleep 10 && printf \"9\n1\n\" | bash /usr/bin/sb > /dev/null 2>&1"' >> /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp fi @@ -2491,11 +2483,7 @@ else yellow "Argo临时域名验证暂不可用,请稍后再试" fi elif [ "$menu" = "2" ]; then -kill -15 $(cat /etc/s-box/sbargopid.log 2>/dev/null) >/dev/null 2>&1 -crontab -l 2>/dev/null > /tmp/crontab.tmp -sed -i '/sbargopid/d' /tmp/crontab.tmp -crontab /tmp/crontab.tmp >/dev/null 2>&1 -rm /tmp/crontab.tmp +ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null rm -rf /etc/s-box/vm_ws_argols.txt rm -rf /etc/local.d/alpineargo.start sbshare > /dev/null 2>&1 @@ -3803,7 +3791,6 @@ rm /tmp/crontab.tmp uncronsb(){ crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/sing-box/d' /tmp/crontab.tmp -sed -i '/sbargopid/d' /tmp/crontab.tmp sed -i '/sbwpphid.log/d' /tmp/crontab.tmp sed -i '/subcmsbid/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 @@ -3895,7 +3882,7 @@ systemctl disable "$svc" >/dev/null 2>&1 done rm -rf /etc/systemd/system/{sing-box.service,argo.service} fi -kill -15 $(cat /etc/s-box/sbargopid.log 2>/dev/null) >/dev/null 2>&1 +ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null kill -15 $(cat /etc/s-box/sbwpphid.log 2>/dev/null) >/dev/null 2>&1 kill -15 $(cat /etc/s-box/subcmsbid.log 2>/dev/null) >/dev/null 2>&1 rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/web @@ -4014,7 +4001,6 @@ allports sbymfl tls=$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].tls.enabled') if [[ "$tls" = "false" ]]; then -argopid if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' || ps -ef 2>/dev/null | grep -q '[c]loudflared.*url'; then vm_zs="TLS关闭" argoym="已开启" From f067aaee5d0b031a9614a121ef6f7cd0b7d697dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:02:33 +0800 Subject: [PATCH 10/22] Update sb.sh --- sb.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sb.sh b/sb.sh index f6ec61a..e334a09 100644 --- a/sb.sh +++ b/sb.sh @@ -3109,12 +3109,12 @@ subtokenipsub elif [ "$menu" = "3" ];then subportipsub elif [ "$menu" = "4" ];then -kill -15 $(cat /etc/s-box/subcmsbid.log 2>/dev/null) >/dev/null 2>&1 +ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null crontab -l 2>/dev/null > /tmp/crontab.tmp -sed -i '/subcmsbid/d' /tmp/crontab.tmp +sed -i '/httpd -f -p/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp -rm -rf /root/web /etc/s-box/subcmsbid.log +rm -rf /root/web rm -rf /etc/local.d/alpinesub.start green "本地IP订阅链接已卸载完成" && sleep 3 && exit else @@ -3122,7 +3122,7 @@ changeserv fi echo green "请稍后…………" -kill -15 $(cat /etc/s-box/subcmsbid.log 2>/dev/null) >/dev/null 2>&1 +ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null mkdir -p /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)" ln -sf /etc/s-box/clmi.yaml /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/clmi.yaml ln -sf /etc/s-box/sbox.json /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/sbox.json @@ -3132,7 +3132,6 @@ busybox-extras httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/ else busybox httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/web > /dev/null 2>&1 & fi -echo "$!" > /etc/s-box/subcmsbid.log sleep 5 if command -v apk >/dev/null 2>&1; then cat > /etc/local.d/alpinesub.start <<'EOF' @@ -3144,8 +3143,8 @@ chmod +x /etc/local.d/alpinesub.start rc-update add local default >/dev/null 2>&1 else crontab -l 2>/dev/null > /tmp/crontab.tmp -sed -i '/subcmsbid/d' /tmp/crontab.tmp -echo '@reboot sleep 10 && /bin/bash -c "busybox httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & pid=\$! && echo \$pid > /etc/s-box/subcmsbid.log"' >> /tmp/crontab.tmp +sed -i '/httpd -f -p/d' /tmp/crontab.tmp +echo '@reboot sleep 10 && /bin/bash -c "busybox httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 &"' >> /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp fi @@ -3792,7 +3791,7 @@ uncronsb(){ crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/sing-box/d' /tmp/crontab.tmp sed -i '/sbwpphid.log/d' /tmp/crontab.tmp -sed -i '/subcmsbid/d' /tmp/crontab.tmp +sed -i '/httpd -f -p/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp } @@ -3884,7 +3883,7 @@ rm -rf /etc/systemd/system/{sing-box.service,argo.service} fi ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null kill -15 $(cat /etc/s-box/sbwpphid.log 2>/dev/null) >/dev/null 2>&1 -kill -15 $(cat /etc/s-box/subcmsbid.log 2>/dev/null) >/dev/null 2>&1 +ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/web rm -f /etc/local.d/alpineargo.start /etc/local.d/alpinesub.start /etc/local.d/alpinews5.start uncronsb @@ -4030,7 +4029,7 @@ echo -e "🚀【 Tuic-v5 】${yellow}端口:$tu5_port 证书形式:$tu5_z if [[ "$sbnh" != "1.10" ]]; then echo -e "🚀【 Anytls 】${yellow}端口:$an_port 证书形式:$an_zs${plain}" fi -if [ -n "$(cat /etc/s-box/subcmsbid.log 2>/dev/null)" ]; then +if [ -n "$(ps -ef 2>/dev/null | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}')" ]; then showsubtoken=$(cat /etc/s-box/subtoken.log 2>/dev/null) showsubport=$(cat /etc/s-box/subport.log 2>/dev/null) subip=$(cat /etc/s-box/server_ip.log) From 186979adb728e14780f0aa94d504445146aad7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:15:08 +0800 Subject: [PATCH 11/22] Update sb.sh --- sb.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sb.sh b/sb.sh index e334a09..bd95798 100644 --- a/sb.sh +++ b/sb.sh @@ -1098,7 +1098,6 @@ echo resvmess(){ if [[ "$tls" = "false" ]]; then - if ps -ef 2>/dev/null | grep -q '[c]loudflared.*url'; then echo white "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" @@ -2475,6 +2474,7 @@ chmod +x /etc/local.d/alpineargo.start rc-update add local default >/dev/null 2>&1 else crontab -l 2>/dev/null > /tmp/crontab.tmp +sed -i '/url http/d' /tmp/crontab.tmp echo '@reboot sleep 10 && /bin/bash -c "nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & sleep 10 && printf \"9\n1\n\" | bash /usr/bin/sb > /dev/null 2>&1"' >> /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp @@ -2484,6 +2484,10 @@ yellow "Argo临时域名验证暂不可用,请稍后再试" fi elif [ "$menu" = "2" ]; then ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null +crontab -l 2>/dev/null > /tmp/crontab.tmp +sed -i '/url http/d' /tmp/crontab.tmp +crontab /tmp/crontab.tmp >/dev/null 2>&1 +rm /tmp/crontab.tmp rm -rf /etc/s-box/vm_ws_argols.txt rm -rf /etc/local.d/alpineargo.start sbshare > /dev/null 2>&1 @@ -3791,6 +3795,7 @@ uncronsb(){ crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/sing-box/d' /tmp/crontab.tmp sed -i '/sbwpphid.log/d' /tmp/crontab.tmp +sed -i '/url http/d' /tmp/crontab.tmp sed -i '/httpd -f -p/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp From b4565ccd43c90a5dabd0cfedf39f5303f3383823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:55:52 +0800 Subject: [PATCH 12/22] Update sbwpph log handling and process management --- sb.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/sb.sh b/sb.sh index bd95798..757a58b 100644 --- a/sb.sh +++ b/sb.sh @@ -3794,7 +3794,7 @@ rm /tmp/crontab.tmp uncronsb(){ crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/sing-box/d' /tmp/crontab.tmp -sed -i '/sbwpphid.log/d' /tmp/crontab.tmp +sed -i '/sbwpph/d' /tmp/crontab.tmp sed -i '/url http/d' /tmp/crontab.tmp sed -i '/httpd -f -p/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 @@ -3887,7 +3887,7 @@ done rm -rf /etc/systemd/system/{sing-box.service,argo.service} fi ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null -kill -15 $(cat /etc/s-box/sbwpphid.log 2>/dev/null) >/dev/null 2>&1 +ps -ef | grep '[s]bwpph' | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/web rm -f /etc/local.d/alpineargo.start /etc/local.d/alpinesub.start /etc/local.d/alpinews5.start @@ -4125,9 +4125,7 @@ esac curl -L -o /etc/s-box/sbwpph -# --retry 2 --insecure https://raw.githubusercontent.com/yonggekkk/sing-box-yg/main/sbwpph_$cpu chmod +x /etc/s-box/sbwpph fi -if [[ -n $(ps -e | grep sbwpph) ]]; then -kill -15 $(cat /etc/s-box/sbwpphid.log 2>/dev/null) >/dev/null 2>&1 -fi +ps -ef | grep '[s]bwpph' | awk '{print $2}' | xargs kill 2>/dev/null v4v6 if [[ -n $v4 ]]; then sw46=4 @@ -4157,10 +4155,10 @@ cp /etc/s-box/sb${num}.json /etc/s-box/sb.json restartsb } unins(){ -kill -15 $(cat /etc/s-box/sbwpphid.log 2>/dev/null) >/dev/null 2>&1 -rm -rf /etc/s-box/sbwpph.log /etc/s-box/sbwpphid.log +ps -ef | grep '[s]bwpph' | awk '{print $2}' | xargs kill 2>/dev/null +rm -rf /etc/s-box/sbwpph.log crontab -l 2>/dev/null > /tmp/crontab.tmp -sed -i '/sbwpphid.log/d' /tmp/crontab.tmp +sed -i '/sbwpph/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp rm -rf /etc/local.d/alpinews5.start @@ -4176,8 +4174,8 @@ chmod +x /etc/local.d/alpinews5.start rc-update add local default >/dev/null 2>&1 else crontab -l 2>/dev/null > /tmp/crontab.tmp -sed -i '/sbwpphid.log/d' /tmp/crontab.tmp -echo '@reboot sleep 10 && /bin/bash -c "nohup $(cat /etc/s-box/sbwpph.log 2>/dev/null) & pid=\$! && echo \$pid > /etc/s-box/sbwpphid.log"' >> /tmp/crontab.tmp +sed -i '/sbwpph/d' /tmp/crontab.tmp +echo '@reboot sleep 10 && /bin/bash -c "nohup $(cat /etc/s-box/sbwpph.log 2>/dev/null) &"' >> /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp fi @@ -4190,7 +4188,7 @@ yellow "0:返回上层" readp "请选择【0-3】:" menu if [ "$menu" = "1" ]; then ins -nohup /etc/s-box/sbwpph -b 127.0.0.1:$port --gool -$sw46 --endpoint 162.159.192.1:2408 >/dev/null 2>&1 & echo "$!" > /etc/s-box/sbwpphid.log +nohup /etc/s-box/sbwpph -b 127.0.0.1:$port --gool -$sw46 --endpoint 162.159.192.1:2408 >/dev/null 2>&1 & green "申请IP中……请稍等……" && sleep 20 resv1=$(curl -sm3 --socks5 localhost:$port icanhazip.com) resv2=$(curl -sm3 -x socks5h://localhost:$port icanhazip.com) @@ -4238,7 +4236,7 @@ echo ' 美国(US) ' readp "可选择国家地区(输入末尾两个大写字母,如美国,则输入US):" guojia -nohup /etc/s-box/sbwpph -b 127.0.0.1:$port --cfon --country $guojia -$sw46 --endpoint 162.159.192.1:2408 >/dev/null 2>&1 & echo "$!" > /etc/s-box/sbwpphid.log +nohup /etc/s-box/sbwpph -b 127.0.0.1:$port --cfon --country $guojia -$sw46 --endpoint 162.159.192.1:2408 >/dev/null 2>&1 & green "申请IP中……请稍等……" && sleep 20 resv1=$(curl -sm3 --socks5 localhost:$port icanhazip.com) resv2=$(curl -sm3 -x socks5h://localhost:$port icanhazip.com) From 82eda2b5aabc932513c98604fbc5d273ddfd0861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 13:21:24 +0800 Subject: [PATCH 13/22] Update process check for httpd in sb.sh Refactor process check for httpd service. --- sb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sb.sh b/sb.sh index 757a58b..4457895 100644 --- a/sb.sh +++ b/sb.sh @@ -4034,7 +4034,7 @@ echo -e "🚀【 Tuic-v5 】${yellow}端口:$tu5_port 证书形式:$tu5_z if [[ "$sbnh" != "1.10" ]]; then echo -e "🚀【 Anytls 】${yellow}端口:$an_port 证书形式:$an_zs${plain}" fi -if [ -n "$(ps -ef 2>/dev/null | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}')" ]; then +if ps -ef 2>/dev/null | grep "[h]ttpd -f -p" >/dev/null; then showsubtoken=$(cat /etc/s-box/subtoken.log 2>/dev/null) showsubport=$(cat /etc/s-box/subport.log 2>/dev/null) subip=$(cat /etc/s-box/server_ip.log) From cf6d596d94475365dd5f4d8720c28b88fa333c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 13:57:00 +0800 Subject: [PATCH 14/22] Update sb.sh --- sb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sb.sh b/sb.sh index 4457895..6efdf28 100644 --- a/sb.sh +++ b/sb.sh @@ -3803,7 +3803,7 @@ rm /tmp/crontab.tmp lnsb(){ rm -rf /usr/bin/sb -curl -L -o /usr/bin/sb -# --retry 2 --insecure https://raw.githubusercontent.com/yonggekkk/sing-box-yg/main/sb.sh +curl -L -o /usr/bin/sb -# --retry 2 --insecure https://raw.githubusercontent.com/yonggekkk/sing-box-yg/beta/sb.sh chmod +x /usr/bin/sb } From a2cd26cff7a5f2c32cf1379eeb0ff2b7f5548091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:28:17 +0800 Subject: [PATCH 15/22] Update sb.sh --- sb.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sb.sh b/sb.sh index 6efdf28..e1a0396 100644 --- a/sb.sh +++ b/sb.sh @@ -4034,15 +4034,17 @@ echo -e "🚀【 Tuic-v5 】${yellow}端口:$tu5_port 证书形式:$tu5_z if [[ "$sbnh" != "1.10" ]]; then echo -e "🚀【 Anytls 】${yellow}端口:$an_port 证书形式:$an_zs${plain}" fi -if ps -ef 2>/dev/null | grep "[h]ttpd -f -p" >/dev/null; then +if [ -s /etc/s-box/subport.log ]; then +showsubport=$(cat /etc/s-box/subport.log) +if ps -ef 2>/dev/null | grep "$showsubport" | grep -v grep >/dev/null; then showsubtoken=$(cat /etc/s-box/subtoken.log 2>/dev/null) -showsubport=$(cat /etc/s-box/subport.log 2>/dev/null) -subip=$(cat /etc/s-box/server_ip.log) +subip=$(cat /etc/s-box/server_ip.log 2>/dev/null) suburl="$subip:$showsubport/$showsubtoken" echo "Clash/Mihomo本地IP订阅地址:http://$suburl/clmi.yaml" echo "Sing-box本地IP订阅地址:http://$suburl/sbox.json" echo "聚合协议本地IP订阅地址:http://$suburl/jhsub.txt" fi +fi if [ "$argoym" = "已开启" ]; then #echo -e "Vmess-UUID:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[0].users[0].uuid')${plain}" #echo -e "Vmess-Path:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].transport.path')${plain}" From 08eb86f793edf006a93d5818f519e6ef25a5ca17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:31:02 +0800 Subject: [PATCH 16/22] Update sb.sh --- sb.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sb.sh b/sb.sh index e1a0396..b4f5f40 100644 --- a/sb.sh +++ b/sb.sh @@ -3084,7 +3084,7 @@ subtoken="$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[0].users[0].uu else subtoken="$menu" fi -rm -rf /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)" +rm -rf /root/websbox/"$(cat /etc/s-box/subtoken.log 2>/dev/null)" echo $subtoken > /etc/s-box/subtoken.log green "订阅链接路径密码:$(cat /etc/s-box/subtoken.log 2>/dev/null)" } @@ -3118,7 +3118,7 @@ crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/httpd -f -p/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp -rm -rf /root/web +rm -rf /root/websbox rm -rf /etc/local.d/alpinesub.start green "本地IP订阅链接已卸载完成" && sleep 3 && exit else @@ -3127,28 +3127,28 @@ fi echo green "请稍后…………" ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null -mkdir -p /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)" -ln -sf /etc/s-box/clmi.yaml /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/clmi.yaml -ln -sf /etc/s-box/sbox.json /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/sbox.json -ln -sf /etc/s-box/jhsub.txt /root/web/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/jhsub.txt +mkdir -p /root/websbox/"$(cat /etc/s-box/subtoken.log 2>/dev/null)" +ln -sf /etc/s-box/clmi.yaml /root/websbox/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/clmi.yaml +ln -sf /etc/s-box/sbox.json /root/websbox/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/sbox.json +ln -sf /etc/s-box/jhsub.txt /root/websbox/"$(cat /etc/s-box/subtoken.log 2>/dev/null)"/jhsub.txt if command -v apk >/dev/null 2>&1; then -busybox-extras httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/web > /dev/null 2>&1 & +busybox-extras httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/websbox > /dev/null 2>&1 & else -busybox httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/web > /dev/null 2>&1 & +busybox httpd -f -p "$(cat /etc/s-box/subport.log 2>/dev/null)" -h /root/websbox > /dev/null 2>&1 & fi sleep 5 if command -v apk >/dev/null 2>&1; then cat > /etc/local.d/alpinesub.start <<'EOF' #!/bin/bash sleep 10 -busybox-extras httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 & +busybox-extras httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/websbox > /dev/null 2>&1 & EOF chmod +x /etc/local.d/alpinesub.start rc-update add local default >/dev/null 2>&1 else crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/httpd -f -p/d' /tmp/crontab.tmp -echo '@reboot sleep 10 && /bin/bash -c "busybox httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/web > /dev/null 2>&1 &"' >> /tmp/crontab.tmp +echo '@reboot sleep 10 && /bin/bash -c "busybox httpd -f -p $(cat /etc/s-box/subport.log 2>/dev/null) -h /root/websbox > /dev/null 2>&1 &"' >> /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 rm /tmp/crontab.tmp fi @@ -3889,7 +3889,7 @@ fi ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep '[s]bwpph' | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null -rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/web +rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/websbox rm -f /etc/local.d/alpineargo.start /etc/local.d/alpinesub.start /etc/local.d/alpinews5.start uncronsb iptables -t nat -F PREROUTING >/dev/null 2>&1 From 153642e450c773c3a9fb8960de227e6e5a345579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:46:59 +0800 Subject: [PATCH 17/22] Update sb.sh --- sb.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sb.sh b/sb.sh index b4f5f40..f5672e5 100644 --- a/sb.sh +++ b/sb.sh @@ -2455,7 +2455,7 @@ readp "请选择【0-2】:" menu if [ "$menu" = "1" ]; then green "请稍等……" cloudflaredargo -ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null +ps -ef | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" | awk '{print $2}' | xargs kill 2>/dev/null nohup /etc/s-box/cloudflared tunnel --url http://localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port') --edge-ip-version auto --no-autoupdate --protocol http2 > /etc/s-box/argo.log 2>&1 & sleep 20 if [[ -n $(curl -sL https://$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}')/ -I | awk 'NR==1 && /404|400|503/') ]]; then @@ -2483,7 +2483,7 @@ else yellow "Argo临时域名验证暂不可用,请稍后再试" fi elif [ "$menu" = "2" ]; then -ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null +ps -ef | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" | awk '{print $2}' | xargs kill 2>/dev/null crontab -l 2>/dev/null > /tmp/crontab.tmp sed -i '/url http/d' /tmp/crontab.tmp crontab /tmp/crontab.tmp >/dev/null 2>&1 @@ -3886,7 +3886,7 @@ systemctl disable "$svc" >/dev/null 2>&1 done rm -rf /etc/systemd/system/{sing-box.service,argo.service} fi -ps -ef | grep '[c]loudflared.*url' | awk '{print $2}' | xargs kill 2>/dev/null +ps -ef | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep '[s]bwpph' | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/websbox From 945f7dcf434f27f931017d927fcdf29132d980b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:54:12 +0800 Subject: [PATCH 18/22] Update sb.sh --- sb.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sb.sh b/sb.sh index f5672e5..a1728e1 100644 --- a/sb.sh +++ b/sb.sh @@ -1098,7 +1098,7 @@ echo resvmess(){ if [[ "$tls" = "false" ]]; then -if ps -ef 2>/dev/null | grep -q '[c]loudflared.*url'; then +if ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')"; then echo white "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" red "🚀【 vmess-ws(tls)+Argo 】临时节点信息如下(可选择3-8-3,自定义CDN优选地址):" && sleep 2 @@ -1592,8 +1592,7 @@ EOF } tls=$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].tls.enabled') - -if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep -q '[c]loudflared.*url' && [ "$tls" = "false" ]; then +if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep -q '[c]loudflared.*url' && [ "$tls" = "false" ]; then +elif ! ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' && ! ps -ef 2>/dev/null | grep -q '[c]loudflared.*url' && [ "$tls" = "false" ]; then +elif ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ! ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' || ps -ef 2>/dev/null | grep -q '[c]loudflared.*url'; then +if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' || ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')"; then vm_zs="TLS关闭" argoym="已开启" else @@ -4048,7 +4047,7 @@ fi if [ "$argoym" = "已开启" ]; then #echo -e "Vmess-UUID:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[0].users[0].uuid')${plain}" #echo -e "Vmess-Path:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].transport.path')${plain}" -if ps -ef 2>/dev/null | grep -q '[c]loudflared.*url'; then +if ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')"; then echo -e "Argo临时域名:${yellow}$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}')${plain}" fi if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run'; then From c4a9b11300ea7db8cf07ed2c4452be5442c3af62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:58:27 +0800 Subject: [PATCH 19/22] Update sb.sh --- sb.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sb.sh b/sb.sh index a1728e1..4a9ddd3 100644 --- a/sb.sh +++ b/sb.sh @@ -1098,7 +1098,7 @@ echo resvmess(){ if [[ "$tls" = "false" ]]; then -if ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')"; then +if ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" >/dev/null 2>&1; then echo white "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" red "🚀【 vmess-ws(tls)+Argo 】临时节点信息如下(可选择3-8-3,自定义CDN优选地址):" && sleep 2 @@ -1592,7 +1592,7 @@ EOF } tls=$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].tls.enabled') -if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" && [ "$tls" = "false" ]; then +if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" >/dev/null 2>&1 && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" && [ "$tls" = "false" ]; then +elif ! ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" >/dev/null 2>&1 && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' && ! ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" && [ "$tls" = "false" ]; then +elif ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' && ! ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" >/dev/null 2>&1 && [ "$tls" = "false" ]; then cat > /etc/s-box/sbox.json </dev/null | grep -q '[c]loudflared.*run' || ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')"; then +if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run' || ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" >/dev/null 2>&1; then vm_zs="TLS关闭" argoym="已开启" else @@ -4047,7 +4047,7 @@ fi if [ "$argoym" = "已开启" ]; then #echo -e "Vmess-UUID:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[0].users[0].uuid')${plain}" #echo -e "Vmess-Path:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].transport.path')${plain}" -if ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')"; then +if ps -ef 2>/dev/null | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" >/dev/null 2>&1; then echo -e "Argo临时域名:${yellow}$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}')${plain}" fi if ps -ef 2>/dev/null | grep -q '[c]loudflared.*run'; then From 47d8d8fe5147ea71f43cf9b9f7417bbd1ca8f157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 15:39:31 +0800 Subject: [PATCH 20/22] Update sb.sh --- sb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sb.sh b/sb.sh index 4a9ddd3..b70501f 100644 --- a/sb.sh +++ b/sb.sh @@ -3802,7 +3802,7 @@ rm /tmp/crontab.tmp lnsb(){ rm -rf /usr/bin/sb -curl -L -o /usr/bin/sb -# --retry 2 --insecure https://raw.githubusercontent.com/yonggekkk/sing-box-yg/beta/sb.sh +curl -L -o /usr/bin/sb -# --retry 2 --insecure https://raw.githubusercontent.com/yonggekkk/sing-box-yg/main/sb.sh chmod +x /usr/bin/sb } From a189c730e8e7850ab7ffee63230358dbe84aaadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 15:40:59 +0800 Subject: [PATCH 21/22] Update sb.sh --- sb.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/sb.sh b/sb.sh index b70501f..240f75e 100644 --- a/sb.sh +++ b/sb.sh @@ -33,7 +33,6 @@ release="Centos" else red "脚本不支持当前的系统,请选择使用Ubuntu,Debian,Centos系统。" && exit fi -export release export sbfiles="/etc/s-box/sb10.json /etc/s-box/sb11.json /etc/s-box/sb.json" export sbnh=$(/etc/s-box/sing-box version 2>/dev/null | awk '/version/{print $NF}' | cut -d '.' -f 1,2) vsid=$(grep -i version_id /etc/os-release | cut -d \" -f2 | cut -d . -f1) From f338ba61fbd9f2764157ae21a7b09444c5a77955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 15:55:44 +0800 Subject: [PATCH 22/22] Fix error handling in sb.sh for sb.json Updated command to handle errors when reading sb.json. --- sb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sb.sh b/sb.sh index 240f75e..e114e2a 100644 --- a/sb.sh +++ b/sb.sh @@ -3884,7 +3884,7 @@ systemctl disable "$svc" >/dev/null 2>&1 done rm -rf /etc/systemd/system/{sing-box.service,argo.service} fi -ps -ef | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" | awk '{print $2}' | xargs kill 2>/dev/null +ps -ef | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json 2>/dev/null | jq -r '.inbounds[1].listen_port')" | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep '[s]bwpph' | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/websbox