https-dns-proxy: update to 2020-11-25: add HTTP auth and DSCP codepoint support
authorStan Grishin <stangri@melmac.net>
Wed, 6 Jan 2021 17:52:56 +0000 (17:52 +0000)
committerPaul Spooren <mail@aparcar.org>
Wed, 6 Jan 2021 21:48:07 +0000 (11:48 -1000)
Signed-off-by: Stan Grishin <stangri@melmac.net>
net/https-dns-proxy/Makefile
net/https-dns-proxy/files/https-dns-proxy.init

index d7e34ec06d26813e069d29d7f11182059ad9ce05..63b1cc4092731d0e66f46dc1d6a3f38139514f4c 100644 (file)
@@ -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 <stangri@melmac.net>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
index cb561372e7f960995365b108a9d1ce0d496b8408..662fe40278c497ee07f41be121e997fd0e3e02cf 100755 (executable)
@@ -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() {