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] 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}"