mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 03:32:34 +08:00
v1.8.2f
——————————— f: ~改名!ShellClash成为过去时! ~执行命令改为crash(覆盖安装则兼容clash命令) ~优化数据库下载逻辑,独立显示版本号 ~定时任务增加更多功能 ~增加推荐任务(任务菜单及新手引导) ~每10分钟保存面板配置及自动同步ntp时间功能移至推荐任务 ~增加自动下载数据库功能 ~自动更新相关任务支持版本校验 ~增加更细化的任务执行日志 ~修复meta内核因内存不足导致无法更新的bug ~修复部分定时任务会每分钟执行一次的bug ~修复切换安装源时输入0会数据错乱的bug d: ~改名!ShellClash成为过去时! ~执行命令改为crash(覆盖安装则兼容clash命令) ~优化数据库下载逻辑,独立显示版本号 ~定时任务增加更多功能 ~增加推荐任务(任务菜单及新手引导) ~每10分钟保存面板配置及自动同步ntp时间功能移至推荐任务 ~增加自动下载数据库功能 ~自动更新相关任务支持版本校验 ~增加更细化的任务执行日志 ~修复meta内核因内存不足导致无法更新的bug ~修复部分定时任务会每分钟执行一次的bug b: ~修复定时任务相关bug a: ~同步最新版本Meta1.17.0内核 ~重写定时任务功能 ·增加更多任务 ·增加自动任务执行条件 ·增加更多定时时间条件 ·增加任务日志及日志推送 ·优化管理脚本 ·优化自定义命令功能 ~iptables增加对tcp53端口的dns劫持 ~部分提示及描述优化 ~修复nft模式本机代理语句报错的bug ~修复服务启动前会执行两次启动检查的bug ~修复自定义规则无法删除旧规则的bug ~修复节点绕过功能未添加no-resolve参数的bug
This commit is contained in:
parent
60790da771
commit
732111b87a
Binary file not shown.
BIN
bin/ShellCrash.tar.gz
Normal file
BIN
bin/ShellCrash.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -3,4 +3,4 @@ clashpre_v=2022.11.25
|
|||
clash_v=v1.7.1
|
||||
meta_v=v1.17.0
|
||||
GeoIP_v=20231230
|
||||
versionsh=1.8.2e
|
||||
versionsh=1.8.2f
|
||||
|
|
42
install.sh
42
install.sh
|
@ -9,7 +9,7 @@ echo='echo -e'
|
|||
}
|
||||
echo "***********************************************"
|
||||
echo "** 欢迎使用 **"
|
||||
echo "** ShellClash **"
|
||||
echo "** ShellCrash **"
|
||||
echo "** by Juewuy **"
|
||||
echo "***********************************************"
|
||||
#内置工具
|
||||
|
@ -17,7 +17,7 @@ dir_avail(){
|
|||
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 -E 'Ava|可用' |awk '{print $2}'
|
||||
}
|
||||
setconfig(){
|
||||
configpath=$clashdir/mark
|
||||
configpath=$CRASHDIR/configs/ShellCrash.cfg
|
||||
[ -n "$(grep ${1} $configpath)" ] && sed -i "s#${1}=.*#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath
|
||||
}
|
||||
webget(){
|
||||
|
@ -42,27 +42,27 @@ webget(){
|
|||
fi
|
||||
}
|
||||
error_down(){
|
||||
$echo "请参考 \033[32mhttps://github.com/juewuy/ShellClash/blob/master/README_CN.md"
|
||||
$echo "请参考 \033[32mhttps://github.com/juewuy/ShellCrash/blob/master/README_CN.md"
|
||||
$echo "\033[33m使用其他安装源重新安装!\033[0m"
|
||||
}
|
||||
#安装及初始化
|
||||
gettar(){
|
||||
webget /tmp/ShellClash.tar.gz $tarurl
|
||||
webget /tmp/ShellCrash.tar.gz $tarurl
|
||||
if [ "$result" != "200" ];then
|
||||
$echo "\033[33m文件下载失败!\033[0m"
|
||||
error_down
|
||||
exit 1
|
||||
else
|
||||
$clashdir/start.sh stop 2>/dev/null
|
||||
$CRASHDIR/start.sh stop 2>/dev/null
|
||||
#解压
|
||||
echo -----------------------------------------------
|
||||
echo 开始解压文件!
|
||||
mkdir -p $clashdir > /dev/null
|
||||
tar -zxf '/tmp/ShellClash.tar.gz' -C $clashdir/ || tar -zxf --no-same-owner '/tmp/ShellClash.tar.gz' -C $clashdir/
|
||||
if [ -f $clashdir/init.sh ];then
|
||||
source $clashdir/init.sh >/dev/null
|
||||
mkdir -p $CRASHDIR > /dev/null
|
||||
tar -zxf '/tmp/ShellCrash.tar.gz' -C $CRASHDIR/ || tar -zxf '/tmp/ShellCrash.tar.gz' --no-same-owner -C $CRASHDIR/
|
||||
if [ -f $CRASHDIR/init.sh ];then
|
||||
source $CRASHDIR/init.sh >/dev/null
|
||||
else
|
||||
rm -rf /tmp/ShellClash.tar.gz
|
||||
rm -rf /tmp/ShellCrash.tar.gz
|
||||
$echo "\033[33m文件解压失败!\033[0m"
|
||||
error_down
|
||||
exit 1
|
||||
|
@ -92,7 +92,7 @@ setdir(){
|
|||
fi
|
||||
}
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[33m注意:安装ShellClash至少需要预留约1MB的磁盘空间\033[0m"
|
||||
$echo "\033[33m注意:安装ShellCrash至少需要预留约1MB的磁盘空间\033[0m"
|
||||
if [ -n "$systype" ];then
|
||||
[ "$systype" = "Padavan" ] && dir=/etc/storage
|
||||
[ "$systype" = "mi_snapshot" ] && {
|
||||
|
@ -174,7 +174,7 @@ if [ ! -w $dir ];then
|
|||
else
|
||||
$echo "目标目录\033[32m$dir\033[0m空间剩余:$(dir_avail $dir -h)"
|
||||
read -p "确认安装?(1/0) > " res
|
||||
[ "$res" = "1" ] && clashdir=$dir/clash || setdir
|
||||
[ "$res" = "1" ] && CRASHDIR=$dir/clash || setdir
|
||||
fi
|
||||
}
|
||||
install(){
|
||||
|
@ -183,11 +183,11 @@ echo 开始从服务器获取安装文件!
|
|||
echo -----------------------------------------------
|
||||
gettar
|
||||
echo -----------------------------------------------
|
||||
echo ShellClash 已经安装成功!
|
||||
echo ShellCrash 已经安装成功!
|
||||
[ "$profile" = "~/.bashrc" ] && echo "请执行【source ~/.bashrc &> /dev/null】命令以加载环境变量!"
|
||||
[ -n "$(ls -l /bin/sh|grep -oE 'zsh')" ] && echo "请执行【source ~/.zshrc &> /dev/null】命令以加载环境变量!"
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[33m输入\033[30;47m clash \033[0;33m命令即可管理!!!\033[0m"
|
||||
$echo "\033[33m输入\033[30;47m crash \033[0;33m命令即可管理!!!\033[0m"
|
||||
echo -----------------------------------------------
|
||||
}
|
||||
|
||||
|
@ -214,12 +214,12 @@ if [ "$USER" != "root" -a -z "$systype" ];then
|
|||
fi
|
||||
|
||||
#检查更新
|
||||
url_cdn="https://fastly.jsdelivr.net/gh/juewuy/ShellClash"
|
||||
url_cdn="https://fastly.jsdelivr.net/gh/juewuy/ShellCrash"
|
||||
[ -z "$url" ] && url=$url_cdn
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[33m请选择想要安装的版本:\033[0m"
|
||||
$echo " 1 \033[32mShellclash公测版\033[0m"
|
||||
$echo " 2 \033[36mShellclash稳定版\033[0m"
|
||||
$echo " 1 \033[32mShellCrash公测版\033[0m"
|
||||
$echo " 2 \033[36mShellCrash稳定版\033[0m"
|
||||
echo -----------------------------------------------
|
||||
read -p "请输入相应数字 > " num
|
||||
if [ -z $num ];then
|
||||
|
@ -239,7 +239,7 @@ webget /tmp/clashversion "$url_dl/bin/version" echooff
|
|||
[ -z "$release_new" ] && release_new=$versionsh
|
||||
rm -rf /tmp/clashversion
|
||||
rm -rf /tmp/clashrelease
|
||||
tarurl=$url_dl/bin/ShellClash.tar.gz
|
||||
tarurl=$url_dl/bin/ShellCrash.tar.gz
|
||||
|
||||
#输出
|
||||
$echo "最新版本:\033[32m$release_new\033[0m"
|
||||
|
@ -248,15 +248,15 @@ $echo "\033[44m如遇问题请加TG群反馈:\033[42;30m t.me/ShellClash \033[
|
|||
$echo "\033[37m支持各种基于openwrt的路由器设备"
|
||||
$echo "\033[33m支持Debian、Centos等标准Linux系统\033[0m"
|
||||
|
||||
if [ -n "$clashdir" ];then
|
||||
if [ -n "$CRASHDIR" ];then
|
||||
echo -----------------------------------------------
|
||||
$echo "检测到旧的安装目录\033[36m$clashdir\033[0m,是否覆盖安装?"
|
||||
$echo "检测到旧的安装目录\033[36m$CRASHDIR\033[0m,是否覆盖安装?"
|
||||
$echo "\033[32m覆盖安装时不会移除配置文件!\033[0m"
|
||||
read -p "覆盖安装/卸载旧版本?(1/0) > " res
|
||||
if [ "$res" = "1" ];then
|
||||
install
|
||||
elif [ "$res" = "0" ];then
|
||||
rm -rf $clashdir
|
||||
rm -rf $CRASHDIR
|
||||
echo -----------------------------------------------
|
||||
$echo "\033[31m 旧版本文件已卸载!\033[0m"
|
||||
setdir
|
||||
|
|
|
@ -1213,7 +1213,9 @@ setserver(){
|
|||
echo -e " 0 返回上级菜单"
|
||||
read -p "请输入对应数字 > " num
|
||||
case $num in
|
||||
[0-99])
|
||||
0)
|
||||
;;
|
||||
[1-99])
|
||||
release_type=$(grep -aE '^1|^2' $CRASHDIR/configs/servers.list | sed -n ""$num"p" | awk '{print $4}')
|
||||
if [ "release_type" = "稳定版" ];then
|
||||
release_url=$(grep -aE '^1' $CRASHDIR/configs/servers.list | sed -n ""$num"p" | awk '{print $3}')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) Juewuy
|
||||
|
||||
version=1.8.2e
|
||||
version=1.8.2f
|
||||
|
||||
setdir(){
|
||||
dir_avail(){
|
||||
|
@ -195,7 +195,7 @@ if [ -n "$profile" ];then
|
|||
source $profile &>/dev/null || echo 运行错误!请使用bash而不是dash运行安装命令!!!
|
||||
#适配zsh环境变量
|
||||
[ -n "$(ls -l /bin/sh|grep -oE 'zsh')" ] && [ -z "$(cat ~/.zshrc 2>/dev/null|grep CRASHDIR)" ] && {
|
||||
echo "alias clash=\"$shtype $CRASHDIR/clash.sh\"" >> ~/.zshrc
|
||||
echo "alias crash=\"$shtype $CRASHDIR/clash.sh\"" >> ~/.zshrc
|
||||
echo "export CRASHDIR=\"$CRASHDIR\"" >> ~/.zshrc
|
||||
source ~/.zshrc &>/dev/null
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user