~自定义内核列表增加了PuerNya版本singbox内核,支持ssr、providers
~切换版本时,会自动切换不可用源至默认源
~修复b版本面板节点无法正确还原的bug
~修复触发自动下载meta内核时意外报错的bug
~修复触发自动下载时首次启动失败的bug
This commit is contained in:
juewuy
2024-01-22 21:06:05 +08:00
parent daed770afd
commit bf9f013c61
9 changed files with 24 additions and 17 deletions

View File

@@ -185,7 +185,7 @@ jobs:
with: with:
tag_name: singbox_core${{ github.event.inputs.tag3 }} tag_name: singbox_core${{ github.event.inputs.tag3 }}
name: singbox_core${{ github.event.inputs.tag3 }} name: singbox_core${{ github.event.inputs.tag3 }}
body: "The ${VERSION} version of ${{ github.event.inputs.tag1 }} \n这是${{ github.event.inputs.tag1 }}的${VERSION}版本内核文件\nhttps://github.com/${{ github.event.inputs.tag1 }}/releases \nZip by upx\n使用了upx进行压缩\nOnly support for ShellCrash\n仅限于ShellCrash项目使用" body: "The ${{env.VERSION}} version of ${{ github.event.inputs.tag1 }} \n这是${{ github.event.inputs.tag1 }}的${{env.VERSION}}版本内核文件\nhttps://github.com/${{ github.event.inputs.tag1 }}/releases \nZip by upx\n使用了upx进行压缩\nOnly support for ShellCrash\n仅限于ShellCrash项目使用"
draft: false draft: false
prerelease: true prerelease: true
files: | files: |

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -5,4 +5,4 @@ meta_v=v1.18.0
singbox_v=1.7.8 singbox_v=1.7.8
GeoIP_v=20240120 GeoIP_v=20240120
versionsh=1.8.8b versionsh=1.8.8c

View File

@@ -3,6 +3,7 @@
error_down(){ error_down(){
echo -e "\033[33m请尝试切换至其他安装源后重新下载\033[0m" echo -e "\033[33m请尝试切换至其他安装源后重新下载\033[0m"
echo -e "或者参考 \033[32;4mhttps://juewuy.github.io/bdaz\033[0m 进行本地安装!"
sleep 1 sleep 1
} }
dir_avail(){ dir_avail(){
@@ -922,10 +923,11 @@ getcore(){
setcustcore(){ setcustcore(){
[ -z "$cpucore" ] && getcpucore [ -z "$cpucore" ] && getcpucore
echo -e "\033[33m请选择需要使用的核心\033[0m" echo -e "\033[33m请选择需要使用的核心\033[0m"
echo -e "1 \033[32m 测试版ClashPre内核 \033[0m" echo -e "1 \033[32m Premium-2023.08.17内核(已停止维护) \033[0m"
echo -e "2 \033[32m 最新Meta.Alpha内核 \033[0m" echo -e "2 \033[32m 最新Meta.Alpha内核(每日更新) \033[0m"
echo -e "3 \033[32m Sing-Box测试内核 \033[0m" echo -e "3 \033[32m singbox-1.8.2内核(支持rule-set) \033[0m"
echo -e "4 \033[33m 自定义内核链接 \033[0m" echo -e "4 \033[32m singbox_PuerNya内核(支持SSR、providers、rule-set) \033[0m"
echo -e "9 \033[33m 自定义内核链接 \033[0m"
read -p "请输入对应数字 > " num read -p "请输入对应数字 > " num
case "$num" in case "$num" in
1) 1)
@@ -944,6 +946,11 @@ setcustcore(){
getcore getcore
;; ;;
4) 4)
crashcore=singbox
custcorelink=https://github.com/juewuy/ShellCrash/releases/download/singbox_core_PuerNya/singbox-linux-$cpucore
getcore
;;
9)
read -p "请输入自定义内核的链接地址(必须是二进制文件) > " link read -p "请输入自定义内核的链接地址(必须是二进制文件) > " link
[ -n "$link" ] && custcorelink="$link" [ -n "$link" ] && custcorelink="$link"
crashcore=unknow crashcore=unknow
@@ -1521,12 +1528,12 @@ setserver(){
;; ;;
a) a)
release_type=stable release_type=stable
setconfig release_type $release_type [ -z "$url_id" ] && url_id=101
setserver setserver
;; ;;
b) b)
release_type=master release_type=master
setconfig release_type $release_type [ -z "$url_id" ] && url_id=101
setserver setserver
;; ;;
c) c)
@@ -1537,7 +1544,7 @@ setserver(){
read -p "是否依然切换到开发版?(1/0) > " res read -p "是否依然切换到开发版?(1/0) > " res
if [ "$res" = 1 ];then if [ "$res" = 1 ];then
release_type=dev release_type=dev
setconfig release_type $release_type [ -z "$url_id" ] && url_id=101
fi fi
setserver setserver
;; ;;
@@ -1632,6 +1639,7 @@ update(){
echo -e " 9 \033[31m卸载ShellCrash\033[0m" echo -e " 9 \033[31m卸载ShellCrash\033[0m"
echo ----------------------------------------------- echo -----------------------------------------------
echo -e "99 \033[36m鸣谢\033[0m" echo -e "99 \033[36m鸣谢\033[0m"
echo -----------------------------------------------
echo -e " 0 返回上级菜单" echo -e " 0 返回上级菜单"
echo ----------------------------------------------- echo -----------------------------------------------
read -p "请输入对应数字 > " num read -p "请输入对应数字 > " num

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Copyright (C) Juewuy # Copyright (C) Juewuy
version=1.8.8b version=1.8.8c
setdir(){ setdir(){
dir_avail(){ dir_avail(){

View File

@@ -181,7 +181,7 @@ start_core(){
startover startover
else else
${COMMAND} &>${TMPDIR}/core_test.log & ${COMMAND} &>${TMPDIR}/core_test.log &
sleep 1 ; kill $! &>/dev/null sleep 2 ; kill $! &>/dev/null
${CRASHDIR}/start.sh start_error ${CRASHDIR}/start.sh start_error
${CRASHDIR}/start.sh stop ${CRASHDIR}/start.sh stop
exit 1 exit 1

View File

@@ -136,7 +136,7 @@ get_save(){ #获取面板信息
fi fi
} }
put_save(){ #推送面板选择 put_save(){ #推送面板选择
[ -z "$3" ] && request_type=GET || request_type=$3 [ -z "$3" ] && request_type=PUT || request_type=$3
if curl --version > /dev/null 2>&1;then if curl --version > /dev/null 2>&1;then
curl -sS -X ${request_type} -H "Authorization: Bearer ${secret}" -H "Content-Type:application/json" "$1" -d "$2" >/dev/null curl -sS -X ${request_type} -H "Authorization: Bearer ${secret}" -H "Content-Type:application/json" "$1" -d "$2" >/dev/null
elif wget --version > /dev/null 2>&1;then elif wget --version > /dev/null 2>&1;then
@@ -269,7 +269,7 @@ get_core_config(){ #下载内核配置文件
else else
if [ "$retry" = 4 ];then if [ "$retry" = 4 ];then
logger "无法获取配置文件,请检查链接格式以及网络连接状态!" 31 logger "无法获取配置文件,请检查链接格式以及网络连接状态!" 31
echo -e "\033[32m也可用浏览器下载以上链接后使用WinSCP手动上传到/tmp目录后执行crash命令\033[0m" echo -e "\033[32m也可用浏览器下载以上链接后使用WinSCP手动上传到/tmp目录后执行crash命令本地导入\033[0m"
exit 1 exit 1
elif [ "$retry" = 3 ];then elif [ "$retry" = 3 ];then
retry=4 retry=4
@@ -1409,16 +1409,16 @@ core_check(){
core_v=$(${TMPDIR}/core.new version 2>/dev/null | grep version | awk '{print $3}') core_v=$(${TMPDIR}/core.new version 2>/dev/null | grep version | awk '{print $3}')
COMMAND='"$BINDIR/CrashCore run -D $BINDIR -c $TMPDIR/config.json"' COMMAND='"$BINDIR/CrashCore run -D $BINDIR -c $TMPDIR/config.json"'
else else
core_v=$(${TMPDIR}/core.new -v 2>/dev/null | sed 's/ linux.*//;s/.* //') core_v=$(${TMPDIR}/core.new -v 2>/dev/null | grep linux | sed 's/ linux.*//;s/.* //')
COMMAND='"$BINDIR/CrashCore -d $BINDIR -f $TMPDIR/config.yaml"' COMMAND='"$BINDIR/CrashCore -d $BINDIR -f $TMPDIR/config.yaml"'
fi fi
setconfig COMMAND "$COMMAND" ${CRASHDIR}/configs/command.env
if [ -z "$core_v" ];then if [ -z "$core_v" ];then
rm -rf ${TMPDIR}/core.new rm -rf ${TMPDIR}/core.new
logger "核心下载失败,请重新运行或更换安装源!" 31 logger "核心下载失败,请重新运行或更换安装源!" 31
exit 1 exit 1
else else
mv -f ${TMPDIR}/core.new ${BINDIR}/CrashCore mv -f ${TMPDIR}/core.new ${BINDIR}/CrashCore
setconfig COMMAND "$COMMAND" ${CRASHDIR}/configs/command.env && source ${CRASHDIR}/configs/command.env
setconfig crashcore $crashcore setconfig crashcore $crashcore
setconfig core_v $core_v setconfig core_v $core_v
fi fi
@@ -1474,8 +1474,7 @@ singbox_check(){ #singbox启动前检查
#检测SSR节点 #检测SSR节点
if [ -n "$(cat $core_config | grep -oE '"shadowsocksr"')" ];then if [ -n "$(cat $core_config | grep -oE '"shadowsocksr"')" ];then
echo ----------------------------------------------- echo -----------------------------------------------
logger "singbox以移除对SSR相关协议的支持请使用clash系内核" 33 logger "singbox以移除对SSR相关协议的支持请使用clash系内核或者PuerNya分支" 33
exit 1
fi fi
core_check core_check
#预下载GeoIP数据库 #预下载GeoIP数据库