~自定义内核链接支持.upx结尾内核文件

This commit is contained in:
juewuy
2026-02-10 19:18:12 +08:00
parent d86969bf9b
commit f2ce2fb9b4
2 changed files with 7 additions and 4 deletions

View File

@@ -354,7 +354,7 @@ setcustcore(){ #自定义内核
checkcustcore
;;
9)
read -p "请输入自定义内核的链接地址(必须是以.tar.gz或.gz结尾的压缩文件) > " link
read -p "请输入自定义内核的链接地址(必须是以.tar.gz、.upx或.gz结尾的压缩文件) > " link
[ -n "$link" ] && custcorelink="$link"
setcoretype
getcore
@@ -398,7 +398,7 @@ setcore() {
[ -z "$crashcore" ] && crashcore="unknow"
[ -z "$zip_type" ] && zip_type="tar.gz"
echo "$crashcore" | grep -q 'singbox' && core_old=singbox || core_old=clash
[ -n "$custcorelink" ] && custcore="$(echo $custcorelink | sed 's#.*github.com##; s#/releases/download/#@#; s#-linux.*$##')"
[ -n "$custcorelink" ] && custcore="$(echo $custcorelink | sed 's#.*github.com##; s#/releases/download/#@#')"
###
echo "-----------------------------------------------"
[ -z "$cpucore" ] && check_cpucore