v1.0.0beta17.6

~大幅度调整和优化导入配置文件功能
~大幅度调整和优化新手引导逻辑和步骤
~新增Hackl0us提供的精简版GeoIP数据库下载
~修复部分情况下提示本地代理连接失败的bug
~修复导入配置文件功能部分bug
This commit is contained in:
juewuy
2020-12-12 10:27:03 +08:00
parent 656682be14
commit 89bca53889
2 changed files with 14 additions and 11 deletions

View File

@@ -629,9 +629,8 @@ clashcfg(){
read -p "请输入对应数字 > " num
if [ -z "$num" ]; then
errornum
clashsh
elif [ "$num" = 0 ]; then
clashsh
i=
elif [ "$num" = 1 ]; then
if [ "$USER" != "root" -a "$USER" != "admin" ];then
echo -----------------------------------------------
@@ -680,10 +679,8 @@ clashcfg(){
elif [ "$num" = 9 ]; then
clashstart
clashsh
else
errornum
clashsh
fi
}
clashadv(){
@@ -714,9 +711,8 @@ clashadv(){
read -p "请输入对应数字 > " num
if [ -z "$num" ]; then
errornum
clashsh
elif [ "$num" = 0 ]; then
clashsh
i=
elif [ "$num" = 2 ]; then
echo -----------------------------------------------
@@ -849,10 +845,8 @@ EOF
elif [ "$num" = 9 ]; then
clashstart
sleep 1
clashsh
else
errornum
clashsh
fi
}
clashcron(){
@@ -999,13 +993,14 @@ clashsh(){
elif [ "$num" = 2 ]; then
clashcfg
clashsh
elif [ "$num" = 3 ]; then
$clashdir/start.sh stop
echo -----------------------------------------------
echo -e "\033[31mClash服务已停止\033[0m"
echo -----------------------------------------------
exit;
clashsh
elif [ "$num" = 4 ]; then
echo -----------------------------------------------
@@ -1033,9 +1028,11 @@ clashsh(){
elif [ "$num" = 6 ]; then
source $clashdir/getdate.sh && clashlink
clashsh
elif [ "$num" = 7 ]; then
clashadv
clashsh
elif [ "$num" = 8 ]; then
source $clashdir/getdate.sh && testcommand

View File

@@ -188,7 +188,7 @@ getlink(){
elif [ "$url" = 0 ];then
Url=""
clashlink
i=100
else
echo -----------------------------------------------
@@ -225,6 +225,7 @@ getlink2(){
echo -----------------------------------------------
echo -e "\033[31m请输入正确的配置文件链接地址\033[0m"
echo -e "\033[33m仅支持http、https、ftp以及ftps链接\033[0m"
sleep 1
clashlink
fi
}
@@ -244,7 +245,6 @@ clashlink(){
read -p "请输入对应数字 > " num
if [ -z "$num" ];then
errornum
clashlink
elif [ "$num" = 0 ];then
i=
elif [ "$num" = 1 ];then
@@ -261,6 +261,7 @@ clashlink(){
fi
fi
getlink
clashlink
elif [ "$num" = 2 ];then
getlink2
@@ -270,6 +271,7 @@ clashlink(){
if [ ! -f "$yaml".bak ];then
echo -----------------------------------------------
echo -e "\033[31m没有找到配置文件的备份\033[0m"
clashlink
else
echo -----------------------------------------------
echo -e 备份文件共有"\033[32m`wc -l < $yamlbak`\033[0m"行内容,当前文件共有"\033[32m`wc -l < $yaml`\033[0m"行内容
@@ -278,9 +280,11 @@ clashlink(){
mv $yamlbak $yaml
echo -----------------------------------------------
echo -e "\033[32m配置文件已还原请手动重启clash服务\033[0m"
sleep 1
else
echo -----------------------------------------------
echo -e "\033[31m操作已取消返回上级菜单\033[0m"
clashlink
fi
fi
@@ -298,6 +302,8 @@ clashlink(){
read -p "确认更新配置文件?[1/0] > " res
if [ "$res" = '1' ]; then
getyaml
else
clashlink
fi
fi