v1.7.10e
~禁止在dash环境下安装脚本并增加错误提示 ~修复升级后导致配置文件被错误移除的bug ~修复小米tun修复工具补丁目录错误的bug
This commit is contained in:
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
|
clash_v=v1.7.1
|
||||||
meta_v=v1.15.0
|
meta_v=v1.15.0
|
||||||
GeoIP_v=20230729
|
GeoIP_v=20230729
|
||||||
versionsh=1.7.10d
|
versionsh=1.7.10e
|
||||||
|
|||||||
@@ -2,8 +2,11 @@
|
|||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
type bash &>/dev/null && shtype=bash || shtype=sh
|
type bash &>/dev/null && shtype=bash || shtype=sh
|
||||||
echo='echo -e' && [ -n "$(echo -e|grep e)" ] && echo=echo
|
echo='echo -e'
|
||||||
|
[ -n "$(echo -e|grep e)" ] && {
|
||||||
|
echo "\033[31m不支持dash环境安装!请先输入bash命令后再运行安装命令!\033[0m"
|
||||||
|
exit
|
||||||
|
}
|
||||||
echo "***********************************************"
|
echo "***********************************************"
|
||||||
echo "** 欢迎使用 **"
|
echo "** 欢迎使用 **"
|
||||||
echo "** ShellClash **"
|
echo "** ShellClash **"
|
||||||
|
|||||||
@@ -182,15 +182,15 @@ startover(){
|
|||||||
}
|
}
|
||||||
clashstart(){
|
clashstart(){
|
||||||
#检查yaml配置文件
|
#检查yaml配置文件
|
||||||
if [ ! -f $clashdir/yamls/config.yaml ];then
|
echo -----------------------------------------------
|
||||||
echo -----------------------------------------------
|
if [ -s $clashdir/yamls/config.yaml -o -n "$Url" -o -n "$Https" ];then
|
||||||
|
$clashdir/start.sh start
|
||||||
|
sleep 1
|
||||||
|
[ -n "$(pidof clash)" ] && startover
|
||||||
|
else
|
||||||
echo -e "\033[31m没有找到配置文件,请先导入配置文件!\033[0m"
|
echo -e "\033[31m没有找到配置文件,请先导入配置文件!\033[0m"
|
||||||
source $clashdir/getdate.sh && clashlink
|
source $clashdir/getdate.sh && clashlink
|
||||||
fi
|
fi
|
||||||
echo -----------------------------------------------
|
|
||||||
$clashdir/start.sh start
|
|
||||||
sleep 1
|
|
||||||
[ -n "$(pidof clash)" ] && startover
|
|
||||||
}
|
}
|
||||||
checkrestart(){
|
checkrestart(){
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
@@ -1663,10 +1663,10 @@ tools(){
|
|||||||
fi
|
fi
|
||||||
tools
|
tools
|
||||||
elif [ "$num" = 8 ]; then
|
elif [ "$num" = 8 ]; then
|
||||||
if [ -f $clashdir/configs/tun.ko ];then
|
if [ -f $clashdir/tools/tun.ko ];then
|
||||||
read -p "是否禁用此功能并移除相关补丁?(1/0) > " res
|
read -p "是否禁用此功能并移除相关补丁?(1/0) > " res
|
||||||
[ "$res" = 1 ] && {
|
[ "$res" = 1 ] && {
|
||||||
rm -rf $clashdir/configs/tun.ko
|
rm -rf $clashdir/tools/tun.ko
|
||||||
echo -e "\033[33m补丁文件已移除,请立即重启设备以防止出错!\033[0m"
|
echo -e "\033[33m补丁文件已移除,请立即重启设备以防止出错!\033[0m"
|
||||||
}
|
}
|
||||||
elif [ -z "$(modinfo tun)" ];then
|
elif [ -z "$(modinfo tun)" ];then
|
||||||
@@ -1680,7 +1680,7 @@ tools(){
|
|||||||
echo 正在连接服务器获取Tun模块补丁文件…………
|
echo 正在连接服务器获取Tun模块补丁文件…………
|
||||||
$clashdir/start.sh webget $TMPDIR/tun.ko $tunfixlink
|
$clashdir/start.sh webget $TMPDIR/tun.ko $tunfixlink
|
||||||
if [ "$?" = "0" ];then
|
if [ "$?" = "0" ];then
|
||||||
mv -f $TMPDIR/tun.ko $clashdir && \
|
mv -f $TMPDIR/tun.ko $clashdir/tools/tun.ko && \
|
||||||
$clashdir/misnap_init.sh tunfix && \
|
$clashdir/misnap_init.sh tunfix && \
|
||||||
echo -e "\033[32m设置成功!请重启clash服务!\033[0m"
|
echo -e "\033[32m设置成功!请重启clash服务!\033[0m"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
version=1.7.10d
|
version=1.7.10e
|
||||||
|
|
||||||
setdir(){
|
setdir(){
|
||||||
dir_avail(){
|
dir_avail(){
|
||||||
@@ -233,9 +233,10 @@ rm -rf /tmp/SC_tmp
|
|||||||
#转换&清理旧版本文件
|
#转换&清理旧版本文件
|
||||||
mkdir -p $clashdir/yamls
|
mkdir -p $clashdir/yamls
|
||||||
mkdir -p $clashdir/tools
|
mkdir -p $clashdir/tools
|
||||||
for file in config.yaml config.yaml.bak user.yaml proxies.yaml proxy-groups.yaml rules.yaml others.yaml ;do
|
for file in config.yaml.bak user.yaml proxies.yaml proxy-groups.yaml rules.yaml others.yaml ;do
|
||||||
mv -f $clashdir/$file $clashdir/yamls/$file 2>/dev/null
|
mv -f $clashdir/$file $clashdir/yamls/$file 2>/dev/null
|
||||||
done
|
done
|
||||||
|
[ ! -L $clashdir/config.yaml ] && mv -f $clashdir/config.yaml $clashdir/yamls/config.yaml 2>/dev/null
|
||||||
for file in fake_ip_filter mac web_save servers.list fake_ip_filter.list fallback_filter.list;do
|
for file in fake_ip_filter mac web_save servers.list fake_ip_filter.list fallback_filter.list;do
|
||||||
mv -f $clashdir/$file $clashdir/configs/$file 2>/dev/null
|
mv -f $clashdir/$file $clashdir/configs/$file 2>/dev/null
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user