Index: net/dnscrypt-proxy/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/net/dnscrypt-proxy/pkg/PLIST-main,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 PLIST-main
--- net/dnscrypt-proxy/pkg/PLIST-main 2 Aug 2017 09:32:40 -0000 1.6
+++ net/dnscrypt-proxy/pkg/PLIST-main 13 Feb 2018 13:39:38 -0000
@@ -1,4 +1,5 @@
@comment $OpenBSD: PLIST-main,v 1.6 2017/08/02 09:32:40 giovanni Exp $
+@conflict dnscrypt-proxy->1.9.5p3
@newgroup _dnscrypt-proxy:688
@newuser _dnscrypt-proxy:688:_dnscrypt-proxy:daemon:dnscrypt-proxy user:/var/empty:/sbin/nologin
@bin bin/hostip
Index: net/dnscrypt-proxy2/Makefile
===================================================================
RCS file: net/dnscrypt-proxy2/Makefile
diff -N net/dnscrypt-proxy2/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/dnscrypt-proxy2/Makefile 13 Feb 2018 13:39:38 -0000
@@ -0,0 +1,44 @@
+# $OpenBSD$
+
+COMMENT= Flexible DNS proxy with support for encrypted protocols
+
+PORTNAME= dnscrypt-proxy
+PORTVERS= 2.0.0
+REVISION= 0
+DISTNAME= ${PORTNAME}-${PORTVERS}
+CATEGORIES= net security
+
+HOMEPAGE= https://dnscrypt.info/
+MAINTAINER= Vinicius Zavam <egyp...@googlemail.com>
+
+GH_ACCOUNT= jedisct1
+GH_PROJECT= ${PORTNAME}
+GH_TAGNAME= ${PORTVERS}
+
+# ISC
+PERMIT_PACKAGE_CDROM= YES
+
+DOCS= README.md
+
+MODULES= lang/go
+
+TARGET_BASE= github.com/${GH_ACCOUNT}/${GH_PROJECT}
+WRKSRC= ${MODGO_WORKSPACE}/src/${TARGET_BASE}
+ALL_TARGET= ${TARGET_BASE}/${GH_PROJECT}
+
+post-configure:
+ cd ${WRKSRC} && ln -sf vendor src && ln -sf ${WRKSRC}/${GH_PROJECT} src/${TARGET_BASE};
+
+do-install:
+ mkdir -p ${PREFIX}/sbin && \
+ ${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/* ${PREFIX}/sbin/;
+
+post-install:
+ mkdir -p ${PREFIX}/etc ${PREFIX}/share/examples/${GH_PROJECT} && \
+ ${INSTALL_DATA} ${MODGO_WORKSPACE}/src/${TARGET_BASE}/${GH_PROJECT}/example* \
+ ${PREFIX}/share/examples/${GH_PROJECT}/ && \
+ ${INSTALL_DATA} ${MODGO_WORKSPACE}/src/${TARGET_BASE}/${GH_PROJECT}/example-dnscrypt-proxy.toml \
+ ${PREFIX}/etc/dnscrypt-proxy.toml;
+ sed -i -e 's,require_dnssec = false,require_dnssec = true,g' ${PREFIX}/etc/dnscrypt-proxy.toml;
+
+.include <bsd.port.mk>
Index: net/dnscrypt-proxy2/distinfo
===================================================================
RCS file: net/dnscrypt-proxy2/distinfo
diff -N net/dnscrypt-proxy2/distinfo
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/dnscrypt-proxy2/distinfo 13 Feb 2018 13:39:38 -0000
@@ -0,0 +1,2 @@
+SHA256 (dnscrypt-proxy-2.0.0.tar.gz) = r8KAYTJpsfXpxYHCPWSIhCGJdPfn4aJcihMJGX1n41g=
+SIZE (dnscrypt-proxy-2.0.0.tar.gz) = 725490
Index: net/dnscrypt-proxy2/pkg/DESCR
===================================================================
RCS file: net/dnscrypt-proxy2/pkg/DESCR
diff -N net/dnscrypt-proxy2/pkg/DESCR
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/dnscrypt-proxy2/pkg/DESCR 13 Feb 2018 13:39:38 -0000
@@ -0,0 +1,7 @@
+DNSCrypt Proxy v2 provides a local service which can be used directly as your
+local resolver or as a DNS forwarder, encrypting requests using protocols
+such as DNSCrypt v2 and DNS-over-HTTP/2.
+
+It includes all the major features from DNSCrypt Proxy v1 (1.9.5), with improved
+reliability, flexibility, usability and performance. You can also combine it with
+TCP tunnels such as the ones used by Tor.
Index: net/dnscrypt-proxy2/pkg/PLIST
===================================================================
RCS file: net/dnscrypt-proxy2/pkg/PLIST
diff -N net/dnscrypt-proxy2/pkg/PLIST
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/dnscrypt-proxy2/pkg/PLIST 13 Feb 2018 13:39:38 -0000
@@ -0,0 +1,12 @@
+@comment $OpenBSD$
+etc/
+etc/dnscrypt-proxy.toml
+share/doc/pkg-readmes/${FULLPKGNAME}
+share/examples/dnscrypt-proxy/
+share/examples/dnscrypt-proxy/example-blacklist.txt
+share/examples/dnscrypt-proxy/example-cloaking-rules.txt
+share/examples/dnscrypt-proxy/example-dnscrypt-proxy.toml
+share/examples/dnscrypt-proxy/example-forwarding-rules.txt
+@conflict dnscrypt-proxy-<2.0.0p0
+@bin sbin/dnscrypt-proxy
+@rcscript ${RCDIR}/dnscrypt_proxy
Index: net/dnscrypt-proxy2/pkg/README
===================================================================
RCS file: net/dnscrypt-proxy2/pkg/README
diff -N net/dnscrypt-proxy2/pkg/README
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/dnscrypt-proxy2/pkg/README 13 Feb 2018 13:39:38 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
++-----------------------------------------------------------------------
+| Running ${FULLPKGNAME} on OpenBSD
++-----------------------------------------------------------------------
+
+dnscrypt-proxy2 listens for DNS queries on a local address and forwards
+them to a DNSCrypt resolver over an encrypted channel.
+
+To use this package, two things are required.
+
+Firstly, enable/start the service.
+
+ # rcctl enable dnscrypt_proxy
+ # rcctl start dnscrypt_proxy
+
+Secondly, set /etc/resolv.conf to perform queries from dnscrypt-proxy2:
+
+ nameserver 127.0.0.1
+ lookup file bind
+
+NOTE: If fetching your IP address dynamically, dhclient(8) will normally
+update resolv.conf with network-provided DNS servers. This can be avoided
+by using "ignore domain-name, domain-name-servers;" in /etc/dhclient.conf.
+
+For more information, see https://dnscrypt.info/
Index: net/dnscrypt-proxy2/pkg/dnscrypt_proxy.rc
===================================================================
RCS file: net/dnscrypt-proxy2/pkg/dnscrypt_proxy.rc
diff -N net/dnscrypt-proxy2/pkg/dnscrypt_proxy.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ net/dnscrypt-proxy2/pkg/dnscrypt_proxy.rc 13 Feb 2018 13:39:38 -0000
@@ -0,0 +1,11 @@
+#!/bin/ksh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/sbin/dnscrypt-proxy -config ${TRUEPREFIX}/etc/dnscrypt-proxy.toml -logfile /var/log/dnscrypt-proxy.log"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1