v1.0.0beta17.7

~增加了在使用功能设置变更配置后告知用户重启的提示
~修复定时更新订阅时不会重启clash服务的bug
~优化语句结构,修复部分情况下菜单层级错乱的bug
~修复卸载时不会清除部分定时任务的bug
~修复pac在部分设备上不可用的bug(待测试)
This commit is contained in:
juewuy
2020-12-12 18:29:59 +08:00
parent 82cadd1aaf
commit 9f9d3c3dcb
3 changed files with 16 additions and 1 deletions

View File

@@ -122,6 +122,13 @@ clashstart(){
sleep 1
[ -n "$(pidof clash)" ] && startover
}
checkrestart(){
echo -----------------------------------------------
echo -e "\033[32m检测到配置文件已变更需要重启clash服务以生效\033[0m"
echo -----------------------------------------------
read -p "是否现在重启clash服务(1/0) > " res
[ "$res" = 1 ] && clashstart
}
#功能相关
setport(){
[ -z "$secret" ] && secret=未设置
@@ -998,7 +1005,10 @@ clashsh(){
exit;
elif [ "$num" = 2 ]; then
checkcfg=$(cat $ccfg)
clashcfg
checkcfg_new=$(cat $ccfg)
[ "$checkcfg" != "$checkcfg_new" ] && checkrestart
clashsh
elif [ "$num" = 3 ]; then
@@ -1037,7 +1047,10 @@ clashsh(){
clashsh
elif [ "$num" = 7 ]; then
checkcfg=$(cat $ccfg)
clashadv
checkcfg_new=$(cat $ccfg)
[ "$checkcfg" != "$checkcfg_new" ] && checkrestart
clashsh
elif [ "$num" = 8 ]; then

View File

@@ -833,6 +833,8 @@ update(){
sed -i '/export clashdir=*/'d $profile
sed -i '/all_proxy/'d $profile
sed -i '/ALL_PROXY/'d $profile
cronset "clash服务"
cronset "订阅链接"
echo -----------------------------------------------
echo -e "\033[36m已卸载ShellClash相关文件有缘再会\033[0m"
echo -e "\033[33m请手动关闭当前窗口以重置环境变量\033[0m"

View File

@@ -472,7 +472,7 @@ function FindProxyForURL(url, host) {
)
return "DIRECT";
else
return "SOCKS5 $host:$mix_port; PROXY $host:$mix_port; DIRECT;"
return "PROXY 192.168.31.1:7890; DIRECT; SOCKS5 192.168.31.1:7890"
}
EOF
compare /tmp/clash_pac $bindir/ui/pac