mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 03:32:34 +08:00
v0.9.2
~添加局域网设备过滤功能 ~修复本地版本号不正常的bug ~修复规则偶尔显示为0的bug
This commit is contained in:
parent
85de9d0bbd
commit
a8f128106a
Binary file not shown.
|
@ -171,19 +171,21 @@ elif [[ $num == 3 ]];then
|
||||||
echo 8 ACL4SSR超重度奈飞全量
|
echo 8 ACL4SSR超重度奈飞全量
|
||||||
echo 0 返回上级菜单
|
echo 0 返回上级菜单
|
||||||
read -p "请输入对应数字 > " num
|
read -p "请输入对应数字 > " num
|
||||||
if [ -z "$num" ];then
|
if [ -z "$num" ];then
|
||||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
echo -e "\033[31m请输入正确的数字!\033[0m"
|
echo -e "\033[31m请输入正确的数字!\033[0m"
|
||||||
clashlink
|
clashlink
|
||||||
else
|
elif [[ "$num" == 0 ]];then
|
||||||
#将对应标记值写入mark
|
clashlink
|
||||||
sed -i '/rule_link*/'d $ccfg
|
else
|
||||||
sed -i "4i\rule_link="$num"" $ccfg
|
#将对应标记值写入mark
|
||||||
rule_link=$num
|
sed -i '/rule_link*/'d $ccfg
|
||||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
sed -i "4i\rule_link="$num"" $ccfg
|
||||||
echo -e "\033[32m设置成功!返回上级菜单!\033[0m"
|
rule_link=$num
|
||||||
clashlink
|
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
fi
|
echo -e "\033[32m设置成功!返回上级菜单!\033[0m"
|
||||||
|
clashlink
|
||||||
|
fi
|
||||||
elif [[ $num == 4 ]];then
|
elif [[ $num == 4 ]];then
|
||||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
echo -e "\033[44m 实验性功能,遇问题请加TG群反馈:\033[42;30m t.me/clashfm \033[0m"
|
echo -e "\033[44m 实验性功能,遇问题请加TG群反馈:\033[42;30m t.me/clashfm \033[0m"
|
||||||
|
@ -201,10 +203,9 @@ elif [[ $num == 4 ]];then
|
||||||
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
echo -e "\033[31m请输入正确的数字!\033[0m"
|
echo -e "\033[31m请输入正确的数字!\033[0m"
|
||||||
clashlink
|
clashlink
|
||||||
else
|
elif [[ "$num" == 0 ]];then
|
||||||
if [[ $num == 0 ]];then
|
|
||||||
clashlink
|
clashlink
|
||||||
fi
|
else
|
||||||
#将对应标记值写入mark
|
#将对应标记值写入mark
|
||||||
sed -i '/server_link*/'d $ccfg
|
sed -i '/server_link*/'d $ccfg
|
||||||
sed -i "4i\server_link="$num"" $ccfg
|
sed -i "4i\server_link="$num"" $ccfg
|
||||||
|
@ -729,7 +730,6 @@ else
|
||||||
clashsh
|
clashsh
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
clashsh(){
|
clashsh(){
|
||||||
#############################
|
#############################
|
||||||
getconfig
|
getconfig
|
||||||
|
|
|
@ -250,10 +250,9 @@ if [ "$res" = '1' ]; then
|
||||||
[ $? -ne 0 ] && echo "文件解压失败!" && exit 1
|
[ $? -ne 0 ] && echo "文件解压失败!" && exit 1
|
||||||
#初始化文件目录
|
#初始化文件目录
|
||||||
mv $clashdir/clashservice /etc/init.d/clash #将clash服务文件移动到系统目录
|
mv $clashdir/clashservice /etc/init.d/clash #将clash服务文件移动到系统目录
|
||||||
|
chmod 777 $clashdir/clash #授予权限
|
||||||
chmod 777 /etc/init.d/clash #授予权限
|
chmod 777 /etc/init.d/clash #授予权限
|
||||||
#写入版本号
|
|
||||||
sed -i '/versionsh_l=*/'d $ccfg
|
|
||||||
sed -i "1i\versionsh_l=$versionsh" $ccfg
|
|
||||||
#删除临时文件
|
#删除临时文件
|
||||||
rm -rf /tmp/clashfm.tar.gz
|
rm -rf /tmp/clashfm.tar.gz
|
||||||
rm -rf /tmp/clashversion
|
rm -rf /tmp/clashversion
|
||||||
|
|
Loading…
Reference in New Issue
Block a user