From 0ca7bb8eb2f48dd96c4d80257067d8684ad2fb5a Mon Sep 17 00:00:00 2001 From: juewuy Date: Mon, 2 Feb 2026 19:30:43 +0800 Subject: [PATCH] =?UTF-8?q?~=E7=8E=B0=E5=9C=A8=E8=B7=B3=E8=BF=87=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E9=AA=8C=E8=AF=81=E5=BC=80=E5=85=B3=E5=AF=B9=E5=86=85?= =?UTF-8?q?=E7=BD=AE=E4=B8=8B=E8=BD=BD=E5=B7=A5=E5=85=B7=E4=B9=9F=E6=9C=89?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/libs/web_get.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/libs/web_get.sh b/scripts/libs/web_get.sh index 51ccb5df..d3c33b6b 100644 --- a/scripts/libs/web_get.sh +++ b/scripts/libs/web_get.sh @@ -17,14 +17,22 @@ webget(){ if wget --help 2>&1 | grep -q 'show-progress' >/dev/null 2>&1; then [ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress' [ "$4" = "rediroff" ] && redirect='--max-redirect=0' || redirect='' - [ "$5" = "skipceroff" ] && certificate='' || certificate='--no-check-certificate' + if [ "$5" = "skipceroff" ] || [ "$skip_cert" = OFF ];then + certificate='' + else + certificate='--no-check-certificate' + fi wget -Y on $agent $progress $redirect $certificate --timeout=3 -O "$1" "$url" && return 0 #成功则退出否则重试 wget -Y off $agent $progress $redirect $certificate --timeout=5 -O "$1" "$2" return $? elif curl --version >/dev/null 2>&1; then [ "$3" = "echooff" ] && progress='-s' || progress='-#' [ "$4" = "rediroff" ] && redirect='' || redirect='-L' - [ "$5" = "skipceroff" ] && certificate='' || certificate='-k' + if [ "$5" = "skipceroff" ] || [ "$skip_cert" = OFF ];then + certificate='' + else + certificate='-k' + fi if curl --version | grep -q '^curl 8.' && ckcmd base64; then auth_b64=$(printf '%s' "$authentication" | base64) result=$(curl $agent -w '%{http_code}' --connect-timeout 3 --proxy-header "Proxy-Authorization: Basic $auth_b64" $progress $redirect $certificate -o "$1" "$url")