From d4b7e6be6d810eb3df6f790144818a0fb2dcc186 Mon Sep 17 00:00:00 2001 From: wanhebin Date: Mon, 14 Mar 2022 22:24:44 +0800 Subject: [PATCH] Fix the bug of URL check failure and fix the bug of download failure --- start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 805bbe5..a577e48 100755 --- a/start.sh +++ b/start.sh @@ -47,8 +47,7 @@ URL='更改为你的clash订阅地址' # 检查url是否有效 Text1="Clash订阅地址可访问!" Text2="Clash订阅地址不可访问!" -# curl -s --head $URL | head -n 1 | grep 'HTTP/1.[01] [23]..' > /dev/null -wget -q -O /dev/null $URL +curl -s --head $URL | head -n 1 | grep 'HTTP/1.[01] [23]..' > /dev/null if_success $Text1 $Text2 # 临时取消环境变量 @@ -59,7 +58,8 @@ unset no_proxy # 拉取更新config.yml文件 Text3="配置文件config.yaml下载成功!" Text4="配置文件config.yaml下载失败,退出启动!" -wget -q -O $Temp_Dir/clash.yaml $URL +#wget -q -O $Temp_Dir/clash.yaml $URL +curl -s -o $Temp_Dir/clash.yaml $URL if_success $Text3 $Text4 # 取出代理相关配置