ASR_BASE

Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/net/nextdns/Makefile b/external/subpack/net/nextdns/Makefile
new file mode 100644
index 0000000..d5276d4
--- /dev/null
+++ b/external/subpack/net/nextdns/Makefile
@@ -0,0 +1,89 @@
+#
+# Copyright (C) 2019 NextDNS Inc
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nextdns
+PKG_VERSION:=1.37.11
+PKG_RELEASE:=1
+
+PKG_SOURCE:=nextdns-$(PKG_VERSION).tar.gz
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE_URL:=https://codeload.github.com/nextdns/nextdns/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f70cb424b0ae47456c8579d3910b486f75afde34572f28f8cf6eb1222e59b88b
+
+PKG_MAINTAINER:=Olivier Poitrey <rs@nextdns.io>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/nextdns/nextdns
+GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/nextdns
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=NextDNS DNS over HTTPS Proxy
+  URL:=https://github.com/nextdns/nextdns
+  DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
+endef
+
+define Package/nextdns/conffiles
+/etc/config/nextdns
+endef
+
+define Package/nextdns/install
+	$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nextdns $(1)/usr/sbin/
+
+	$(INSTALL_DIR) $(1)/etc/config
+	$(INSTALL_CONF) ./files/nextdns.config $(1)/etc/config/nextdns
+endef
+
+define Package/nextdns/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+  nextdns install
+fi
+endef
+
+define Package/nextdns/prerm
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+  nextdns uninstall
+fi
+endef
+
+define Package/nextdns/description
+  Official NextDNS DNS over HTTPS Proxy.
+endef
+
+define Package/golang-github-nextdns-nextdns-dev
+$(call Package/nextdns)
+$(call GoPackage/GoSubMenu)
+  TITLE+= (source files)
+  PKGARCH:=all
+endef
+
+define Package/golang-github-nextdns-nextdns-dev/description
+$(call Package/nextdns/description)
+
+  This package provides the source files for the client/bridge program.
+endef
+
+$(eval $(call GoBinPackage,nextdns))
+$(eval $(call BuildPackage,nextdns))
+$(eval $(call GoSrcPackage,golang-github-nextdns-nextdns-dev))
+$(eval $(call BuildPackage,golang-github-nextdns-nextdns-dev))
diff --git a/external/subpack/net/nextdns/files/nextdns.config b/external/subpack/net/nextdns/files/nextdns.config
new file mode 100644
index 0000000..7e9e1d7
--- /dev/null
+++ b/external/subpack/net/nextdns/files/nextdns.config
@@ -0,0 +1,30 @@
+config nextdns main
+    option enabled '1'
+
+    # 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
+
+    # 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'
+
+    # Configure NextDNS cli client to serve DNS to other clients on the network.
+    option setup_router '1'
+
+    # Expose LAN clients information in NextDNS analytics.
+    option report_client_info '1'
+
+    # When enabled, use DNS servers located in jurisdictions with strong privacy laws.
+    # Available locations are: Switzerland, Iceland, Finland, Panama and Hong Kong.
+    option hardened_privacy '0'
+
+    # Log individual queries to system log.
+    option log_queries '0'
\ No newline at end of file