diff --git a/dnsproxy/Makefile b/dnsproxy/Makefile index 22ed248cc..b7319c437 100644 --- a/dnsproxy/Makefile +++ b/dnsproxy/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsproxy -PKG_VERSION:=0.50.1 +PKG_VERSION:=0.50.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=3a5cfae38bf75bcbb4b534d67d1a598b8121e744860a897bf9848bfcfcb5bdbb +PKG_HASH:=f65764a196508bc134e05cdb9d282b790641dfe0e8e8aa99b01544317f791487 PKG_MAINTAINER:=Tianling Shen PKG_LICENSE:=Apache-2.0 diff --git a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh index 490cef19b..35f3fb7ce 100755 --- a/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh +++ b/luci-app-mosdns/root/usr/share/mosdns/mosdns.sh @@ -64,18 +64,17 @@ adlist_update() ( ) geodat_update() ( - geodat_download() ( - 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/" - echo -e "\e[1;32mDownloading "$mirror"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1\e[0m" - curl --connect-timeout 60 -m 900 --ipv4 -kfSLo "$TMPDIR/$1" ""$mirror"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/$1" - ) TMPDIR=$(mktemp -d) || exit 1 - geodat_download geoip.dat && geodat_download geosite.dat - if [ $? -ne 0 ]; then - rm -rf "$TMPDIR" - exit 1 - fi + 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/" + # geoip.dat - cn-private + echo -e "\e[1;32mDownloading "$mirror"https://github.com/Loyalsoldier/geoip/releases/latest/download/geoip-only-cn-private.dat\e[0m" + curl --connect-timeout 60 -m 900 --ipv4 -kfSLo "$TMPDIR/geoip.dat" ""$mirror"https://github.com/Loyalsoldier/geoip/releases/latest/download/geoip-only-cn-private.dat" + [ $? -ne 0 ] && rm -rf "$TMPDIR" && exit 1 + # geosite.dat + echo -e "\e[1;32mDownloading "$mirror"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat\e[0m" + curl --connect-timeout 60 -m 900 --ipv4 -kfSLo "$TMPDIR/geosite.dat" ""$mirror"https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" + [ $? -ne 0 ] && rm -rf "$TMPDIR" && exit 1 cp -f "$TMPDIR"/* /usr/share/v2ray rm -rf "$TMPDIR" )