nextdns: Update version 1.1.5 + add per host config option 10606/head
authorOlivier Poitrey <rs@nextdns.io>
Thu, 21 Nov 2019 10:26:31 +0000 (02:26 -0800)
committerOlivier Poitrey <rs@nextdns.io>
Thu, 21 Nov 2019 10:42:12 +0000 (02:42 -0800)
* Update nextdns to version 1.1.5 which adds IPv6 dual stack support.
* Add the ability to configure per host configuration id from uci.

Signed-off-by: Olivier Poitrey <rs@nextdns.io>
net/nextdns/Makefile
net/nextdns/files/nextdns.config
net/nextdns/files/nextdns.init

index 367263b1c784e2b0c7d87e9a63dc4f066f3e2215..08496997a6548475ab7f1ca74dddace0859b53dc 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nextdns
-PKG_VERSION:=1.1.3
-PKG_RELEASE:=2
+PKG_VERSION:=1.1.5
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
 PKG_SOURCE_URL:=https://github.com/nextdns/nextdns.git
-PKG_MIRROR_HASH:=50ba4f90330c1d0f7075f7ac4802f7262cf5653b38e58875a45a56aa37214b39
+PKG_MIRROR_HASH:=01ff61771bcf076f1659167b8676234fdefefac9cd0a05aa1d491a7c5f0145fa
 
 PKG_MAINTAINER:=Olivier Poitrey <rs@nextdns.io>
 PKG_LICENSE:=MIT
index 560d1267b29fa1da5666d1899db3b8c961c808aa..7e34291bf6eca54992a025cde9aa598e4af603f8 100644 (file)
@@ -4,7 +4,17 @@ config nextdns main
     # NextDNS custom configuration id (create on on https://nextdns.io).
     # If not defined, this package will act as a non-logging, non-filtering
     # DNS over HTTPS resolver.
-    # option config abcdef
+    #
+    #option config abcdef
+
+    # Custom configurations can also be conditionally assigned to LAN hosts based
+    # their MAC address or subnet. The first matching host_config wins. If both
+    # host_config and config are defined, config is always placed last, as default
+    # option.
+    #
+    #list host_config 'da:c8:6d:b6:93:78=fedcba'
+    #list host_config '10.0.1.2/32=abc123'
+    #list host_config '10.0.3.0/24=def321'
 
     # Listen on a custom local port so a DNS front (like dnsmasq) can use us as
     # a forwarder.
index 1faaaa37a1856a3ea13a12328e952b4ed45aa481..789f7d96864f7cb2b02e5aef37f5b4c9d3e63f70 100644 (file)
@@ -23,12 +23,17 @@ dnsmasq_reload() {
         fi
 }
 
+handle_host_config() {
+    host_config_args="$host_config_args -config=$1"
+}
+
 start_service() {
         config_load nextdns
         config_get_bool enabled main enabled "1"
         rm -f /tmp/dnsmasq.d/nextdns.conf
         if [ "$enabled" = "1" ]; then
                 config_get config main config ""
+                config_list_foreach main host_config handle_host_config
                 config_get listen main listen "127.0.0.1:5342"
                 config_get_bool report_client_info main report_client_info "1"
                 config_get_bool hardened_privacy main hardened_privacy "0"
@@ -44,8 +49,10 @@ start_service() {
                 fi
 
                 procd_open_instance
+                # shellcheck disable=SC2086
                 procd_set_param command "$PROG" run \
                         -listen="$listen" \
+                        $host_config_args \
                         -config="$config" \
                         -report-client-info="$report_client_info" \
                         -hardened-privacy="$hardened_privacy" \