mirror of
https://github.com/kenzok8/openwrt-packages
synced 2025-01-08 13:27:28 +08:00
update 2024-02-27 02:01:23
This commit is contained in:
parent
8441192061
commit
3a56025813
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-mosdns
|
||||
PKG_VERSION:=1.5.17
|
||||
PKG_VERSION:=1.5.18
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LUCI_TITLE:=LuCI Support for mosdns
|
||||
|
@ -174,8 +174,7 @@ o.default = "geosite.dat"
|
||||
o:value("geosite.dat", "v2ray-geosite")
|
||||
o:value("https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt", "anti-AD")
|
||||
o:value("https://raw.githubusercontent.com/Cats-Team/AdRules/main/mosdns_adrules.txt", "Cats-Team/AdRules")
|
||||
o:value("https://raw.githubusercontent.com/ookangzheng/dbl-oisd-nl/master/dbl_light.txt", "oisd (small)")
|
||||
o:value("https://raw.githubusercontent.com/ookangzheng/dbl-oisd-nl/master/dbl.txt", "oisd (big)")
|
||||
o:value("https://raw.githubusercontent.com/neodevpro/neodevhost/master/domain", "NEO DEV HOST")
|
||||
|
||||
o = s:taboption("basic", Button, "_reload", translate("Restart-Service"), translate("Restart the MosDNS process to take effect of new configuration"))
|
||||
o.write = function()
|
||||
|
@ -228,7 +228,9 @@ start_service() {
|
||||
if [ -f "/etc/mosdns/rule/.ad_source" ]; then
|
||||
for url in $ad_source;
|
||||
do
|
||||
[ "$url" = "geosite.dat" ] && continue
|
||||
if [ "$url" = "geosite.dat" ] || [ $(echo "$url" | grep -c -E "^file://") -eq 1 ]; then
|
||||
continue
|
||||
fi
|
||||
if [ $(grep -c "$url" "/etc/mosdns/rule/.ad_source") -eq 0 ]; then
|
||||
update_list=1
|
||||
break
|
||||
|
@ -54,10 +54,17 @@ get_adlist() (
|
||||
|
||||
adlist_update() {
|
||||
[ "$(uci -q get mosdns.config.adblock)" != 1 ] && exit 0
|
||||
lock_file=/var/lock/mosdns_ad_update.lock
|
||||
ad_source=$(uci -q get mosdns.config.ad_source)
|
||||
AD_TMPDIR=$(mktemp -d) || exit 1
|
||||
mirror=""
|
||||
: > /etc/mosdns/rule/.ad_source
|
||||
if [ -f "$lock_file" ]; then
|
||||
has_update=0
|
||||
exit 0
|
||||
else
|
||||
: > $lock_file
|
||||
fi
|
||||
has_update=0
|
||||
for url in $ad_source;
|
||||
do
|
||||
@ -83,7 +90,7 @@ adlist_update() {
|
||||
\cp $AD_TMPDIR/* /etc/mosdns/rule/adlist
|
||||
}
|
||||
fi
|
||||
rm -rf "$AD_TMPDIR"
|
||||
rm -rf "$AD_TMPDIR" $lock_file
|
||||
}
|
||||
|
||||
geodat_update() (
|
||||
|
@ -22,6 +22,8 @@ PKG_MAINTAINER:=sbwml <admin@cooluc.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/urlesistiana/v2dat
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user