aboutsummaryrefslogtreecommitdiff
path: root/net/dnsproxy
diff options
context:
space:
mode:
authorTianling Shen <cnsztl@immortalwrt.org>2021-06-28 14:23:24 +0800
committerTianling Shen <cnsztl@immortalwrt.org>2021-07-15 21:15:24 +0800
commitfb2121084b0748dd858100d6bf89ebf33ffebaed (patch)
tree7b9c898a534ac83ec75bbc137d23a565f8ed6a6c /net/dnsproxy
parentefc8bc28ab434eed9ca29d8128f767d80ff98323 (diff)
dnsproxy: add new package
A simple DNS proxy server that supports all existing DNS protocols including DNS-over-TLS, DNS-over-HTTPS, DNSCrypt, and DNS-over-QUIC. Moreover, it can work as a DNS-over-HTTPS, DNS-over-TLS or DNS-over-QUIC server. For documents, see https://github.com/AdguardTeam/dnsproxy. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Diffstat (limited to 'net/dnsproxy')
-rw-r--r--net/dnsproxy/Makefile46
-rw-r--r--net/dnsproxy/test.sh3
2 files changed, 49 insertions, 0 deletions
diff --git a/net/dnsproxy/Makefile b/net/dnsproxy/Makefile
new file mode 100644
index 000000000..3b5557b52
--- /dev/null
+++ b/net/dnsproxy/Makefile
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-3.0-only
+#
+# Copyright (C) 2021 ImmortalWrt.org
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dnsproxy
+PKG_VERSION:=0.38.2
+PKG_RELEASE:=$(AUTORELESE)
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=cc240be1e6975cc782155427f45a3753beb647d0de44f2e9f734486fc19db379
+
+PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/AdguardTeam/dnsproxy
+GO_PKG_LDFLAGS:=-s -w
+GO_PKG_LDFLAGS_X:=main.VersionString=v$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/dnsproxy
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
+ URL:=https://github.com/AdguardTeam/dnsproxy
+ DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
+endef
+
+define Package/dnsproxy/description
+ A simple DNS proxy server that supports all existing DNS protocols including
+ DNS-over-TLS, DNS-over-HTTPS, DNSCrypt, and DNS-over-QUIC.Moreover, it can
+ work as a DNS-over-HTTPS, DNS-over-TLS or DNS-over-QUIC server.
+endef
+
+$(eval $(call GoBinPackage,dnsproxy))
+$(eval $(call BuildPackage,dnsproxy))
diff --git a/net/dnsproxy/test.sh b/net/dnsproxy/test.sh
new file mode 100644
index 000000000..60e06a25d
--- /dev/null
+++ b/net/dnsproxy/test.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+dnsproxy --version | grep "$PKG_VERSION"