* 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>
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
# 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.
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"
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" \