Update sb.sh

This commit is contained in:
甬哥侃侃侃ygkkk
2025-08-12 10:10:06 +08:00
committed by GitHub
parent 6fef0ea062
commit 7805e73f0b
+6 -4
View File
@@ -4960,9 +4960,11 @@ fi
v4v6
if [[ -n $v4 ]]; then
sw46=4
edp='162.159.192.1:2408'
else
red "IPV4不存在,确保安装过WARP-IPV4模式"
sw46=6
edp='[2606:4700:d0::a29f:c001]:2408'
fi
echo
readp "设置WARP-plus-Socks5端口(回车跳过端口默认40000):" port
@@ -5002,14 +5004,14 @@ yellow "0:返回上层"
readp "请选择【0-3】:" menu
if [ "$menu" = "1" ]; then
ins
nohup setsid /etc/s-box/sbwpph -b 127.0.0.1:$port --gool -$sw46 >/dev/null 2>&1 & echo "$!" > /etc/s-box/sbwpphid.log
nohup setsid /etc/s-box/sbwpph -b 127.0.0.1:$port --gool -$sw46 --endpoint $edp >/dev/null 2>&1 & echo "$!" > /etc/s-box/sbwpphid.log
green "申请IP中……请稍等……" && sleep 20
resv1=$(curl -s --socks5 localhost:$port icanhazip.com)
resv2=$(curl -sx socks5h://localhost:$port icanhazip.com)
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 >/dev/null 2>&1" > /etc/s-box/sbwpph.log
echo "/etc/s-box/sbwpph -b 127.0.0.1:$port --gool -$sw46 --endpoint $edp >/dev/null 2>&1" > /etc/s-box/sbwpph.log
crontab -l > /tmp/crontab.tmp
sed -i '/sbwpphid.log/d' /tmp/crontab.tmp
echo '@reboot /bin/bash -c "nohup setsid $(cat /etc/s-box/sbwpph.log 2>/dev/null) & pid=\$! && echo \$pid > /etc/s-box/sbwpphid.log"' >> /tmp/crontab.tmp
@@ -5054,14 +5056,14 @@ echo '
美国(US
'
readp "可选择国家地区(输入末尾两个大写字母,如美国,则输入US):" guojia
nohup setsid /etc/s-box/sbwpph -b 127.0.0.1:$port --cfon --country $guojia -$sw46 >/dev/null 2>&1 & echo "$!" > /etc/s-box/sbwpphid.log
nohup setsid /etc/s-box/sbwpph -b 127.0.0.1:$port --cfon --country $guojia -$sw46 --endpoint $edp >/dev/null 2>&1 & echo "$!" > /etc/s-box/sbwpphid.log
green "申请IP中……请稍等……" && sleep 20
resv1=$(curl -s --socks5 localhost:$port icanhazip.com)
resv2=$(curl -sx socks5h://localhost:$port icanhazip.com)
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 >/dev/null 2>&1" > /etc/s-box/sbwpph.log
echo "/etc/s-box/sbwpph -b 127.0.0.1:$port --cfon --country $guojia -$sw46 --endpoint $edp >/dev/null 2>&1" > /etc/s-box/sbwpph.log
crontab -l > /tmp/crontab.tmp
sed -i '/sbwpphid.log/d' /tmp/crontab.tmp
echo '@reboot /bin/bash -c "nohup setsid $(cat /etc/s-box/sbwpph.log 2>/dev/null) & pid=\$! && echo \$pid > /etc/s-box/sbwpphid.log"' >> /tmp/crontab.tmp