aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2024-02-08 03:05:54 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2024-02-08 03:05:54 +0000
commit6b11474239435f6c65b9aba9e39e51e4935ed321 (patch)
tree65b964777e0798735e3830c8bd5c543f7e275367
parentc25a68e1e6002bc24134868af854b24155bd21b5 (diff)
downloadports-6b11474239435f6c65b9aba9e39e51e4935ed321.tar.gz
ports-6b11474239435f6c65b9aba9e39e51e4935ed321.zip
net/https_dns_proxy: new port had been added (+)
Light-weight (written in plain C) DNS-HTTPS, non-caching translation proxy when DNSCrypt-Proxy does not quite fit (or even does not work). WWW: https://github.com/aarond10/https_dns_proxy
-rw-r--r--dns/Makefile1
-rw-r--r--dns/https_dns_proxy/Makefile29
-rw-r--r--dns/https_dns_proxy/distinfo3
-rw-r--r--dns/https_dns_proxy/files/patch-CMakeLists.txt20
-rw-r--r--dns/https_dns_proxy/pkg-descr15
5 files changed, 68 insertions, 0 deletions
diff --git a/dns/Makefile b/dns/Makefile
index daf0b7055422..18c8aac235dc 100644
--- a/dns/Makefile
+++ b/dns/Makefile
@@ -80,6 +80,7 @@
SUBDIR += hesiod
SUBDIR += hetzner_ddns
SUBDIR += hostdb
+ SUBDIR += https_dns_proxy
SUBDIR += idnkit
SUBDIR += idnkit2
SUBDIR += inadyn
diff --git a/dns/https_dns_proxy/Makefile b/dns/https_dns_proxy/Makefile
new file mode 100644
index 000000000000..7a71dddc918d
--- /dev/null
+++ b/dns/https_dns_proxy/Makefile
@@ -0,0 +1,29 @@
+PORTNAME= https_dns_proxy
+PORTVERSION= g20231226
+CATEGORIES= dns net
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Light-weight DNS-HTTPS, non-caching translation proxy
+WWW= https://github.com/aarond10/https_dns_proxy
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libcares.so:dns/c-ares \
+ libcurl.so:ftp/curl \
+ libev.so:devel/libev
+
+USES= cmake
+USE_GITHUB= yes
+GH_ACCOUNT= aarond10
+GH_TAGNAME= 8afbba7
+
+CMAKE_ARGS= -DSW_VERSION:STRING=2023.12.26-${GH_TAGNAME}
+
+PLIST_FILES= bin/${PORTNAME}
+
+do-install:
+ ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \
+ ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/dns/https_dns_proxy/distinfo b/dns/https_dns_proxy/distinfo
new file mode 100644
index 000000000000..5c85b3a2f047
--- /dev/null
+++ b/dns/https_dns_proxy/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1703626567
+SHA256 (aarond10-https_dns_proxy-g20231226-8afbba7_GH0.tar.gz) = 118c192d97587eeb54dbf40aff2cc919e9bd1d3c78a3c8489fddfe73009f9e4c
+SIZE (aarond10-https_dns_proxy-g20231226-8afbba7_GH0.tar.gz) = 28002
diff --git a/dns/https_dns_proxy/files/patch-CMakeLists.txt b/dns/https_dns_proxy/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..462aea6deea2
--- /dev/null
+++ b/dns/https_dns_proxy/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig 2023-12-26 21:36:07 UTC
++++ CMakeLists.txt
+@@ -67,6 +67,7 @@ endif()
+
+ find_path(LIBCARES_INCLUDE_DIR ares.h)
+ find_path(LIBEV_INCLUDE_DIR ev.h)
++cmake_path(GET LIBEV_INCLUDE_DIR PARENT_PATH LOCALBASE)
+
+ if(CUSTOM_LIBCURL_INSTALL_PATH)
+ message(STATUS "Using custom libcurl from: ${CUSTOM_LIBCURL_INSTALL_PATH}")
+@@ -108,7 +109,8 @@ set(TARGET_NAME "https_dns_proxy")
+ aux_source_directory(src SRC_LIST)
+ set(SRC_LIST ${SRC_LIST})
+ add_executable(${TARGET_NAME} ${SRC_LIST})
+-set(LIBS ${LIBS} cares curl ev resolv)
++set(LIBS ${LIBS} cares curl ev)
++target_link_directories(${TARGET_NAME} PRIVATE ${LOCALBASE}/lib)
+ target_link_libraries(${TARGET_NAME} ${LIBS})
+ set_property(TARGET ${TARGET_NAME} PROPERTY C_STANDARD 11)
+
diff --git a/dns/https_dns_proxy/pkg-descr b/dns/https_dns_proxy/pkg-descr
new file mode 100644
index 000000000000..3820dfcbc367
--- /dev/null
+++ b/dns/https_dns_proxy/pkg-descr
@@ -0,0 +1,15 @@
+https_dns_proxy is light-weight DNS<->HTTPS, non-caching translation
+proxy for the RFC 8484 DNS-over-HTTPS standard. It receives regular
+(UDP) DNS requests and issues them via DoH.
+
+Using DNS over HTTPS makes eavesdropping and spoofing of DNS traffic
+between you and the HTTPS DNS provider (Google/Cloudflare) much less
+likely, of course so long as you trust your DoH provider. Features:
+
+ - Tiny size (<45kiB)
+ - Uses cURL for HTTP/2 and pipelining, keeping resolve latencies
+ extremely low
+ - Single-threaded, non-blocking select() server for use on
+ resource-starved embedded systems
+ - Designed to sit in front of dnsmasq or similar caching resolver
+ for transparent use