11 Commits

Author SHA1 Message Date
juewuy
28e3cf3d63 ~自动打包内核优化,并增加premium内核 2023-04-15 19:52:28 +08:00
Bot
b8cc2377f8 更新Meta.Alpha内核至alpha-c2d1f71 2023-04-14 20:04:08 +00:00
juewuy
fb11f42d1b Merge pull request #372 from RikudouPatrickstar/pr
适配 meta 内核的两行版本信息
2023-04-14 21:38:27 +08:00
RikusouPatrickstar
d6eb83ac30 适配 meta 内核的两行版本信息 2023-04-14 21:15:15 +08:00
juewuy
f24e796dcc Merge branch 'master' of https://github.com/juewuy/ShellClash into master 2023-04-14 16:45:40 +08:00
juewuy
46fd3ffb85 ~修复目录空间大小检测失败的bug 2023-04-14 16:45:31 +08:00
Bot
c64aef6145 更新Meta.Alpha内核至alpha-99dee00 2023-04-12 16:31:51 +00:00
juewuy
3ddb69e44e Merge branch 'master' of https://github.com/juewuy/ShellClash into master 2023-04-13 00:29:02 +08:00
juewuy
055cfbffa1 增加meta测试版内核的自动打包流程 2023-04-13 00:28:52 +08:00
Bot
5816d112ad 更新Meta.Alpha内核至alpha-99dee00 2023-04-12 16:03:36 +00:00
juewuy
56bc372d18 增加meta测试版内核的自动打包流程 2023-04-13 00:01:05 +08:00
8 changed files with 58 additions and 17 deletions

View File

@@ -48,16 +48,9 @@ jobs:
with:
tag_name: clash.meta.alpha
name: clash.meta.alpha
body: "The alpha version of clash.meta core \n这是clash.meta的Alpha版本内核文件\n version=${download_version}\n https://github.com/MetaCubeX/Clash.Meta/releases/tag/Prerelease-Alpha \nZip by upx\n使用了upx进行压缩\nOnly support for ShellClash\n仅限于ShellClash项目使用"
body: "The alpha version of clash.meta core \n这是clash.meta的Alpha版本内核文件\nhttps://github.com/MetaCubeX/Clash.Meta/releases/tag/Prerelease-Alpha \nZip by upx\n使用了upx进行压缩\nOnly support for ShellClash\n仅限于ShellClash项目使用"
draft: false
prerelease: true
files: |
./tmp/*
- name: Commit and push version
run: |
sed -i "s/meta.a_v=.*/meta.a_v=$(./tmp/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
rm -fr ./tmp
git config --global user.email "juewuy@126.com" && git config --global user.name "Bot"
git add . && git commit -m "更新Meta.Alpha内核至${download_version}" || exit 0
git push

View File

@@ -50,7 +50,7 @@ jobs:
rm -fr ./bin/clash.meta/*
cp ./tmp/* ./bin/clash.meta/
rm -fr ./tmp
sed -i "s/meta_v=.*/meta_v=$(./bin/clash.meta/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
sed -i "s/meta_v=.*/meta_v=$(./bin/clash.meta/clash-linux-amd64 -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')/" bin/version
- name: Commit and push
run: |
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"

View File

@@ -0,0 +1,49 @@
name: Update Premium latest Core
on:
schedule:
- cron: "0 20 * * 1,3,5,6"
workflow_dispatch:
env:
download_version: latest
download_url: https://release.dreamacro.workers.dev
jobs:
Update:
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@main
- name: Init Dependencies
run: |
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
wget https://github.com/upx/upx/releases/download/v3.93/upx-3.93-amd64_linux.tar.xz
tar xf upx-3.96-amd64_linux.tar.xz
tar xf upx-3.93-amd64_linux.tar.xz
- name: Download Core
run: |
archs="386 amd64 armv5 armv7 arm64 mips-softfloat mipsle-hardfloat mipsle-softfloat"
mkdir tmp
for arch in ${archs};do
wget "${download_url}/${download_version}/clash-linux-${arch}-${download_version}.gz" -O - | gunzip -c > ./tmp/clash-linux-${arch}
chmod +x ./tmp/clash-linux-${arch}
if [ "${arch}" != "armv5" ];then
if [[ ${arch} == mips* ]];then
./upx-3.93-amd64_linux/upx ./tmp/clash-linux-${arch}
else
./upx-3.96-amd64_linux/upx ./tmp/clash-linux-${arch}
fi
fi
done
mv -f ./tmp/clash-linux-arm64 ./tmp/clash-linux-armv8
rm -fr upx*
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
tag_name: clash.premium.latest
name: clash.premium.latest
body: "The latest version of clash.premium core \n这是clash.premium的最新版本内核文件\nhttps://github.com/Dreamacro/clash/releases/tag/premium \nZip by upx\n使用了upx进行压缩\nOnly support for ShellClash\n仅限于ShellClash项目使用"
draft: false
prerelease: true
files: |
./tmp/*

View File

@@ -2,6 +2,5 @@ clashnet_v=v1.7.6
clashpre_v=2022.11.25
clash_v=v1.7.1
meta_v=v1.14.2
meta.a_v=v1.14.2
GeoIP_v=20230408
versionsh=1.7.4f

View File

@@ -11,7 +11,7 @@ echo "** by Juewuy **"
echo "***********************************************"
#内置工具
dir_avail(){
df -h $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep Ava |awk '{print $2}'
df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep Ava |awk '{print $2}'
}
setconfig(){
configpath=$clashdir/mark
@@ -168,7 +168,7 @@ fi
if [ ! -w $dir ];then
$echo "\033[31m没有$dir目录写入权限!请重新设置!\033[0m" && sleep 1 && setdir
else
$echo "目标目录\033[32m$dir\033[0m空间剩余$(dir_avail $dir)"
$echo "目标目录\033[32m$dir\033[0m空间剩余$(dir_avail $dir -h)"
read -p "确认安装?(1/0) > " res
[ "$res" = "1" ] && clashdir=$dir/clash || setdir
fi

View File

@@ -843,7 +843,7 @@ update(){
[ "$clashcore" = "clashpre" ] && clash_n=$clashpre_v
[ "$clashcore" = "clash.net" ] && clash_n=$clashnet_v
[ "$clashcore" = "clash.meta" ] && clash_n=$meta_v
clash_v=$($bindir/clash -v 2>/dev/null | sed 's/ linux.*//;s/.* //')
clash_v=$($bindir/clash -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
[ -z "$clash_v" ] && clash_v=$clashv
echo -e "\033[30;47m欢迎使用更新功能\033[0m"
echo -----------------------------------------------

View File

@@ -5,7 +5,7 @@ version=1.7.4f
setdir(){
dir_avail(){
df -h $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep Ava |awk '{print $2}'
df $2 $1 |awk '{ for(i=1;i<=NF;i++){ if(NR==1){ arr[i]=$i; }else{ arr[i]=arr[i]" "$i; } } } END{ for(i=1;i<=NF;i++){ print arr[i]; } }' |grep Ava |awk '{print $2}'
}
set_usb_dir(){
echo -e "请选择安装目录"
@@ -116,7 +116,7 @@ fi
if [ ! -w $dir ];then
echo -e "\033[31m没有$dir目录写入权限!请重新设置!\033[0m" && sleep 1 && setdir
else
echo -e "目标目录\033[32m$dir\033[0m空间剩余$(dir_avail $dir)"
echo -e "目标目录\033[32m$dir\033[0m空间剩余$(dir_avail $dir -h)"
read -p "确认安装?(1/0) > " res
[ "$res" = "1" ] && clashdir=$dir/clash || setdir
fi
@@ -151,7 +151,7 @@ mv -f /tmp/SC_tmp/* $clashdir 2>/dev/null
#初始化
[ -f "$clashdir/mark" ] || echo '#ShellClash配置文件不明勿动' > $clashdir/mark
#本地安装跳过新手引导
[ -z "$url" ] && setconfig userguide 1
#[ -z "$url" ] && setconfig userguide 1
#判断系统类型写入不同的启动文件
if [ -f /etc/rc.common ];then
#设为init.d方式启动

View File

@@ -1119,7 +1119,7 @@ bfstart(){
$0 webget $bindir/clash "$update_url/bin/$clashcore/clash-linux-$cpucore"
#校验内核
chmod +x $bindir/clash 2>/dev/null
clashv=$($bindir/clash -v 2>/dev/null | sed 's/ linux.*//;s/.* //')
clashv=$($bindir/clash -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
if [ -z "$clashv" ];then
rm -rf $bindir/clash
logger "核心下载失败,请重新运行或更换安装源!" 31