From e948d41622e425530474351dd675b29e4e7758d6 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Wed, 6 Jan 2021 17:52:56 +0000 Subject: [PATCH] https-dns-proxy: update to 2020-11-25: add HTTP auth and DSCP codepoint support Signed-off-by: Stan Grishin --- net/https-dns-proxy/Makefile | 8 +++---- .../files/https-dns-proxy.init | 22 ++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/net/https-dns-proxy/Makefile b/net/https-dns-proxy/Makefile index d7e34ec06d..63b1cc4092 100644 --- a/net/https-dns-proxy/Makefile +++ b/net/https-dns-proxy/Makefile @@ -1,14 +1,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=https-dns-proxy -PKG_VERSION:=2020-08-21 +PKG_VERSION:=2020-11-25 PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy -PKG_SOURCE_DATE:=2020-08-21 -PKG_SOURCE_VERSION:=dd22b71250d33d0c8c39bb01a595e016db819c56 -PKG_MIRROR_HASH:=1c93a9f0833e120880d3b311e43db568d219e047e100a03ed6c7a3c00544d36c +PKG_SOURCE_DATE:=2020-11-25 +PKG_SOURCE_VERSION:=3861ff694c59b9e47a1ead5703dd6a7121e66510 +PKG_MIRROR_HASH:=1616ebeba193b5f8891790a6477d014510caa9ce8b99dcd3fe4e8f78b8744ae1 PKG_MAINTAINER:=Stan Grishin PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/net/https-dns-proxy/files/https-dns-proxy.init b/net/https-dns-proxy/files/https-dns-proxy.init index cb561372e7..662fe40278 100755 --- a/net/https-dns-proxy/files/https-dns-proxy.init +++ b/net/https-dns-proxy/files/https-dns-proxy.init @@ -8,13 +8,18 @@ START=80 # shellcheck disable=SC2034 USE_PROCD=1 +if type extra_command 1>/dev/null 2>&1; then + extra_command 'version' 'Show version information' +else # shellcheck disable=SC2034 -EXTRA_COMMANDS='version' -version() { echo "$PKG_VERSION"; } + EXTRA_COMMANDS='version' +fi +readonly PROG=/usr/sbin/https-dns-proxy dnsmasqConfig='' -PROG=/usr/sbin/https-dns-proxy +version() { echo "$PKG_VERSION"; } + xappend() { param="$param $1"; } @@ -43,10 +48,11 @@ append_parm() { start_instance() { local cfg="$1" param listen_addr listen_port i + append_parm "$cfg" 'resolver_url' '-r' append_parm "$cfg" 'listen_addr' '-a' '127.0.0.1' append_parm "$cfg" 'listen_port' '-p' "$p" + append_parm "$cfg" 'dscp_codepoint' '-c' append_parm "$cfg" 'bootstrap_dns' '-b' - append_parm "$cfg" 'resolver_url' '-r' append_parm "$cfg" 'user' '-u' 'nobody' append_parm "$cfg" 'group' '-g' 'nogroup' append_parm "$cfg" 'proxy_server' '-t' @@ -86,10 +92,6 @@ start_instance() { p="$((p+1))" } -service_triggers() { - procd_add_reload_trigger 'https-dns-proxy' -} - start_service() { local p=5053 config_load 'https-dns-proxy' @@ -105,7 +107,7 @@ start_service() { stop_service() { config_load 'https-dns-proxy' - config_get dnsmasqConfig 'config' 'update_dnsmasq_config' '*' + config_get dnsmasqConfig 'config' 'update_dnsmasq_config' '*' dhcp_backup 'restore' if [ -n "$(uci -q changes dhcp)" ]; then uci -q commit dhcp @@ -114,7 +116,7 @@ stop_service() { } service_triggers() { - procd_add_reload_trigger 'https-dns-proxy' + procd_add_config_trigger "config.change" "https-dns-proxy" /etc/init.d/https-dns-proxy reload } dnsmasq_add_doh_server() { -- 2.30.2