luci-app-mosdns: disable custom adblock list mirror
This commit is contained in:
parent
9e1381cb60
commit
cca5d2ff12
@ -41,8 +41,10 @@ adlist_update() (
|
||||
ad_source=$(uci -q get mosdns.config.ad_source)
|
||||
[ $ad_source = "geosite.dat" ] && exit 0
|
||||
AD_TMPDIR=$(mktemp -d) || exit 1
|
||||
if [[ $a =~ "^https://raw.githubusercontent.com" ]]; then
|
||||
google_status=$(curl -I -4 -m 3 -o /dev/null -s -w %{http_code} http://www.google.com/generate_204)
|
||||
[ $google_status -ne "204" ] && mirror="https://ghproxy.com/"
|
||||
fi
|
||||
echo -e "\e[1;32mDownloading $mirror$ad_source\e[0m"
|
||||
curl --connect-timeout 60 -m 90 --ipv4 -fSLo "$AD_TMPDIR/adlist.txt" "$mirror$ad_source"
|
||||
if [ $? -ne 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user