v1.0.0beta17.2

~修复使用在线节点时获取配置文件报错的bug
~修复手动更新订阅界面不显示已保存链接的bug
~下载dashboard面板时,自动检测目录是否可写
This commit is contained in:
juewuy
2020-11-15 13:01:29 +08:00
parent 7e528f5b2b
commit de571b58e3
4 changed files with 34 additions and 39 deletions

View File

@@ -55,7 +55,7 @@ webget(){
[ "$3" = "echoon" ] && progress=''
[ -z "$4" ] && redirect='' || redirect='--max-redirect=0'
wget -Y on $progress $redirect --no-check-certificate --timeout=5 -O $1 $2
[ $? -eq 0 ] && result="200"
[ "$?" = 0 ] && result="200"
fi
export all_proxy=''
}
@@ -148,8 +148,8 @@ EOF`
fi
else
Https=""
#检测节点
if [ -z "$(cat $yamlnew | grep 'server:' | grep -v 'nameserver')" ];then
#检测节点或providers
if [ -z "$(cat $yamlnew | grep -E 'server:|proxy-providers:' | grep -v 'nameserver')" ];then
echo -----------------------------------------------
logger "获取到了配置文件,但似乎并不包含正确的节点信息!" 31
echo -----------------------------------------------
@@ -182,8 +182,7 @@ EOF`
mv -f $yamlnew $yaml
fi
echo 配置文件已生成正在启动clash使其生效
#启clash服务
$0 stop
#启clash服务
$0 start
if [ "$?" = 0 ];then
logger "配置文件获取成功clash服务已启动"
@@ -489,7 +488,7 @@ bfstart(){
#检查clash核心
if [ ! -f $bindir/clash ];then
if [ -f $clashdir/clash ];then
mv $clashdir/clash $bindir/clash && chmod 777 $bindir/clash
mv $clashdir/clash $bindir/clash && chmod +x $bindir/clash
else
logger "未找到clash核心正在下载" 33
[ -z "$clashcore" ] && [ "$redir_mod" = "混合模式" -o "$redir_mod" = "Tun模式" ] && clashcore=clashpre || clashcore=clash
@@ -613,7 +612,7 @@ getyaml)
getyaml
;;
webget)
webget $1 $2 $3 $4
webget $2 $3 $4 $5
;;
web_save)
getconfig