aboutsummaryrefslogtreecommitdiff
path: root/net/nextdns
diff options
context:
space:
mode:
authorOlivier Poitrey <rs@nextdns.io>2019-11-21 02:26:31 -0800
committerOlivier Poitrey <rs@nextdns.io>2019-11-21 02:41:28 -0800
commit8619255463911621b209aa1ba0a35b02411dcf90 (patch)
tree28dd950b52206ab9280c8e5d0ee0da03e63677ad /net/nextdns
parent24667753a20250e3df33ffe7f30b063a02ff01ee (diff)
nextdns: Update version 1.1.5 + add per host config option
* 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>
Diffstat (limited to 'net/nextdns')
-rw-r--r--net/nextdns/Makefile6
-rw-r--r--net/nextdns/files/nextdns.config12
-rw-r--r--net/nextdns/files/nextdns.init7
3 files changed, 21 insertions, 4 deletions
diff --git a/net/nextdns/Makefile b/net/nextdns/Makefile
index 367263b1c..08496997a 100644
--- a/net/nextdns/Makefile
+++ b/net/nextdns/Makefile
@@ -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
diff --git a/net/nextdns/files/nextdns.config b/net/nextdns/files/nextdns.config
index 560d1267b..7e34291bf 100644
--- a/net/nextdns/files/nextdns.config
+++ b/net/nextdns/files/nextdns.config
@@ -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.
diff --git a/net/nextdns/files/nextdns.init b/net/nextdns/files/nextdns.init
index 1faaaa37a..789f7d968 100644
--- a/net/nextdns/files/nextdns.init
+++ b/net/nextdns/files/nextdns.init
@@ -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" \