mirror of
https://github.com/sirpdboy/sirpdboy-package.git
synced 2025-01-09 04:17:45 +08:00
up adguardhome107.6
This commit is contained in:
parent
b99f644348
commit
80442c2862
@ -6,13 +6,13 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=adguardhome
|
PKG_NAME:=adguardhome
|
||||||
PKG_VERSION:=0.108.0-b.4
|
PKG_VERSION:=0.107.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_VERSION:=89d9b03dfec8a5f1406507d45e582e852e748859
|
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||||
PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
|
PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
|
||||||
PKG_MIRROR_HASH:=skip
|
PKG_MIRROR_HASH:=6ad030cf8e47e35354b24cd6bdfce3afb9e26006a81a0596f11aaba8cfcc9e9b
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-3.0-only
|
PKG_LICENSE:=GPL-3.0-only
|
||||||
PKG_LICENSE_FILES:=LICENSE.txt
|
PKG_LICENSE_FILES:=LICENSE.txt
|
||||||
@ -22,21 +22,19 @@ PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host
|
|||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:=CONFIG_ADGUARDHOME_COMPRESS_GOPROXY
|
|
||||||
|
|
||||||
GO_PKG:=github.com/AdguardTeam/AdGuardHome
|
GO_PKG:=github.com/AdguardTeam/AdGuardHome
|
||||||
GO_PKG_BUILD_PKG:=github.com/AdguardTeam/AdGuardHome
|
GO_PKG_BUILD_PKG:=github.com/AdguardTeam/AdGuardHome
|
||||||
|
|
||||||
AGH_BUILD_TIME:=$(shell date -d @$(SOURCE_DATE_EPOCH) +%FT%TZ%z)
|
AGH_BUILD_TIME:=$(shell date -d @$(SOURCE_DATE_EPOCH) +%FT%TZ%z)
|
||||||
AGH_VERSION_PKG:=github.com/AdguardTeam/AdGuardHome/internal/version
|
AGH_VERSION_PKG:=github.com/AdguardTeam/AdGuardHome/internal/version
|
||||||
GO_PKG_LDFLAGS_X:=$(AGH_VERSION_PKG).channel=release \
|
GO_PKG_LDFLAGS_X:=$(AGH_VERSION_PKG).channel=release \
|
||||||
$(AGH_VERSION_PKG).version=v$(PKG_VERSION) \
|
$(AGH_VERSION_PKG).version=$(PKG_SOURCE_VERSION) \
|
||||||
$(AGH_VERSION_PKG).buildtime=$(AGH_BUILD_TIME) \
|
$(AGH_VERSION_PKG).buildtime=$(AGH_BUILD_TIME) \
|
||||||
$(AGH_VERSION_PKG).goarm=$(GO_ARM) \
|
$(AGH_VERSION_PKG).goarm=$(GO_ARM) \
|
||||||
$(AGH_VERSION_PKG).gomips=$(GO_MIPS)
|
$(AGH_VERSION_PKG).gomips=$(GO_MIPS)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
include ../../lang/golang/golang-package.mk
|
||||||
|
|
||||||
define Package/adguardhome
|
define Package/adguardhome
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
@ -55,17 +53,6 @@ define Package/adguardhome/description
|
|||||||
Free and open source, powerful network-wide ads and trackers blocking DNS server.
|
Free and open source, powerful network-wide ads and trackers blocking DNS server.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/config
|
|
||||||
config ADGUARDHOME_COMPRESS_GOPROXY
|
|
||||||
bool "Compiling with GOPROXY proxy"
|
|
||||||
default n
|
|
||||||
endef
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ADGUARDHOME_COMPRESS_GOPROXY),y)
|
|
||||||
export GO111MODULE=on
|
|
||||||
export GOPROXY=https://goproxy.bj.bcebos.com
|
|
||||||
endif
|
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
( \
|
( \
|
||||||
pushd $(PKG_BUILD_DIR) ; \
|
pushd $(PKG_BUILD_DIR) ; \
|
||||||
|
@ -21,31 +21,29 @@ end
|
|||||||
function get_template_config()
|
function get_template_config()
|
||||||
local b
|
local b
|
||||||
local d=""
|
local d=""
|
||||||
local file = "/tmp/resolv.conf.d/resolv.conf.auto"
|
for cnt in io.lines("/tmp/resolv.conf.d/resolv.conf.auto") do
|
||||||
if not fs.access(file) then
|
b=string.match (cnt,"^[^#]*nameserver%s+([^%s]+)$")
|
||||||
file = "/tmp/resolv.conf.auto"
|
if (b~=nil) then
|
||||||
|
d=d.." - "..b.."\n"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
for cnt in io.lines(file) do
|
local f=io.open("/usr/share/AdGuardHome/AdGuardHome_template.yaml", "r+")
|
||||||
b = string.match(cnt, "^[^#]*nameserver%s+([^%s]+)$")
|
local tbl = {}
|
||||||
if (b ~= nil) then d = d .. " - " .. b .. "\n" end
|
local a=""
|
||||||
end
|
while (1) do
|
||||||
local f = io.open("/usr/share/AdGuardHome/AdGuardHome_template.yaml", "r+")
|
a=f:read("*l")
|
||||||
local tbl = {}
|
if (a=="#bootstrap_dns") then
|
||||||
local a = ""
|
a=d
|
||||||
while (1) do
|
elseif (a=="#upstream_dns") then
|
||||||
a = f:read("*l")
|
a=d
|
||||||
if (a == "#bootstrap_dns") then
|
elseif (a==nil) then
|
||||||
a = d
|
break
|
||||||
elseif (a == "#upstream_dns") then
|
end
|
||||||
a = d
|
table.insert(tbl, a)
|
||||||
elseif (a == nil) then
|
end
|
||||||
break
|
f:close()
|
||||||
end
|
http.prepare_content("text/plain; charset=utf-8")
|
||||||
table.insert(tbl, a)
|
http.write(table.concat(tbl, "\n"))
|
||||||
end
|
|
||||||
f:close()
|
|
||||||
http.prepare_content("text/plain; charset=utf-8")
|
|
||||||
http.write(table.concat(tbl, "\n"))
|
|
||||||
end
|
end
|
||||||
function reload_config()
|
function reload_config()
|
||||||
fs.remove("/tmp/AdGuardHometmpconfig.yaml")
|
fs.remove("/tmp/AdGuardHometmpconfig.yaml")
|
||||||
|
@ -50,9 +50,7 @@ stop_forward_dnsmasq()
|
|||||||
uci del_list dhcp.@dnsmasq[0].server=$addr 2>/dev/null
|
uci del_list dhcp.@dnsmasq[0].server=$addr 2>/dev/null
|
||||||
addrlist="`uci get dhcp.@dnsmasq[0].server 2>/dev/null`"
|
addrlist="`uci get dhcp.@dnsmasq[0].server 2>/dev/null`"
|
||||||
if [ -z "$addrlist" ] ; then
|
if [ -z "$addrlist" ] ; then
|
||||||
resolvfile="/tmp/resolv.conf.d/resolv.conf.auto"
|
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto 2>/dev/null
|
||||||
[ ! -f "$resolvfile" ] && resolvfile="/tmp/resolv.conf.auto"
|
|
||||||
uci set dhcp.@dnsmasq[0].resolvfile="$resolvfile" 2>/dev/null
|
|
||||||
uci delete dhcp.@dnsmasq[0].noresolv 2>/dev/null
|
uci delete dhcp.@dnsmasq[0].noresolv 2>/dev/null
|
||||||
fi
|
fi
|
||||||
uci commit dhcp
|
uci commit dhcp
|
||||||
@ -229,6 +227,9 @@ _do_redirect()
|
|||||||
fi
|
fi
|
||||||
config_get configpath $CONFIGURATION configpath "/etc/config/AdGuardHome.yaml"
|
config_get configpath $CONFIGURATION configpath "/etc/config/AdGuardHome.yaml"
|
||||||
AdGuardHome_PORT=$(config_editor "dns.port" "" "$configpath" "1")
|
AdGuardHome_PORT=$(config_editor "dns.port" "" "$configpath" "1")
|
||||||
|
if [ ! -s "$configpath" ]; then
|
||||||
|
cp -f /usr/share/AdGuardHome/AdGuardHome_template.yaml $configpath
|
||||||
|
fi
|
||||||
if [ -z "$AdGuardHome_PORT" ]; then
|
if [ -z "$AdGuardHome_PORT" ]; then
|
||||||
AdGuardHome_PORT="0"
|
AdGuardHome_PORT="0"
|
||||||
fi
|
fi
|
||||||
|
@ -20,7 +20,7 @@ if [ ! -f "$configpath" ]; then
|
|||||||
echo "please make a config first"
|
echo "please make a config first"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
wget --no-check-certificate https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt -O- | base64 -d > /tmp/gfwlist.txt
|
wget-ssl --no-check-certificate https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt -O- | base64 -d > /tmp/gfwlist.txt
|
||||||
cat /tmp/gfwlist.txt | awk -v upst="$gfwupstream" 'BEGIN{getline;}{
|
cat /tmp/gfwlist.txt | awk -v upst="$gfwupstream" 'BEGIN{getline;}{
|
||||||
s1=substr($0,1,1);
|
s1=substr($0,1,1);
|
||||||
if (s1=="!")
|
if (s1=="!")
|
||||||
|
Loading…
Reference in New Issue
Block a user