Compare commits
11 Commits
clash.meta
...
clash.prem
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28e3cf3d63 | ||
|
|
b8cc2377f8 | ||
|
|
fb11f42d1b | ||
|
|
d6eb83ac30 | ||
|
|
f24e796dcc | ||
|
|
46fd3ffb85 | ||
|
|
c64aef6145 | ||
|
|
3ddb69e44e | ||
|
|
055cfbffa1 | ||
|
|
5816d112ad | ||
|
|
56bc372d18 |
@@ -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
|
||||
|
||||
|
||||
2
.github/workflows/update_meta_core.yaml
vendored
2
.github/workflows/update_meta_core.yaml
vendored
@@ -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"
|
||||
|
||||
49
.github/workflows/update_premium.latest_core.yaml
vendored
Normal file
49
.github/workflows/update_premium.latest_core.yaml
vendored
Normal 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/*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 -----------------------------------------------
|
||||
|
||||
@@ -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方式启动
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user