From 3772632854ab378203258a86e83cf7e080a80df8 Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Tue, 15 May 2012 20:14:53 +0000 Subject: [PATCH] DNSCrypt is a piece of lightweight software that everyone should use to boost online privacy and security. It works by encrypting all DNS traffic between the user and OpenDNS, preventing any spying, spoofing or man-in-the-middle attacks. WWW: https://www.opendns.com/technology/dnscrypt/ PR: ports/167833 Submitted by: Leo Vandewoestijne --- dns/Makefile | 1 + dns/dnscrypt-proxy/Makefile | 40 ++++++++++++++++++++++ dns/dnscrypt-proxy/distinfo | 2 ++ dns/dnscrypt-proxy/files/dnscrypt-proxy.in | 36 +++++++++++++++++++ dns/dnscrypt-proxy/files/pkg-message.in | 18 ++++++++++ dns/dnscrypt-proxy/pkg-descr | 6 ++++ dns/dnscrypt-proxy/pkg-plist | 2 ++ 7 files changed, 105 insertions(+) create mode 100644 dns/dnscrypt-proxy/Makefile create mode 100644 dns/dnscrypt-proxy/distinfo create mode 100644 dns/dnscrypt-proxy/files/dnscrypt-proxy.in create mode 100644 dns/dnscrypt-proxy/files/pkg-message.in create mode 100644 dns/dnscrypt-proxy/pkg-descr create mode 100644 dns/dnscrypt-proxy/pkg-plist diff --git a/dns/Makefile b/dns/Makefile index 8692c857b4d3..359747607940 100644 --- a/dns/Makefile +++ b/dns/Makefile @@ -30,6 +30,7 @@ SUBDIR += dnscap SUBDIR += dnscheck SUBDIR += dnscheckengine + SUBDIR += dnscrypt-proxy SUBDIR += dnsdoctor SUBDIR += dnsflood SUBDIR += dnshijacker diff --git a/dns/dnscrypt-proxy/Makefile b/dns/dnscrypt-proxy/Makefile new file mode 100644 index 000000000000..23bb2629f579 --- /dev/null +++ b/dns/dnscrypt-proxy/Makefile @@ -0,0 +1,40 @@ +# New ports collection makefile for: dnscrypt-proxy +# Date created: 15 May 2012 +# Whom: Leo Vandewoestijne +# +# $FreeBSD$ +# + +PORTNAME= dnscrypt-proxy +PORTVERSION= 0.9.3 +CATEGORIES= dns +MASTER_SITES= http://cloud.github.com/downloads/opendns/dnscrypt-proxy/ \ + http://www.dns-lab.com/downloads/dnscrypt-proxy/ + +MAINTAINER= freebsd@dns-lab.com +COMMENT= Boost privacy and security of DNS + +GNU_CONFIGURE= yes +USE_GMAKE= yes + +SUB_FILES= pkg-message + +USE_RC_SUBR= ${PORTNAME} + +MAN8= dnscrypt-proxy.8 dnscrypt-proxy.8.markdown + +PORTDOCS= AUTHORS ChangeLog COPYING INSTALL NEWS \ + README README.markdown TECHNOTES THANKS + +pre-install: + @${INSTALL_MAN} ${WRKSRC}/man/dnscrypt-proxy.8 ${MAN8PREFIX}/man/man8/ + @${INSTALL_MAN} ${WRKSRC}/man/dnscrypt-proxy.8.markdown ${MAN8PREFIX}/man/man8/ + +post-install: +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/ +.endif + @${CAT} ${WRKDIR}/pkg-message + +.include diff --git a/dns/dnscrypt-proxy/distinfo b/dns/dnscrypt-proxy/distinfo new file mode 100644 index 000000000000..5f4c95cc95d5 --- /dev/null +++ b/dns/dnscrypt-proxy/distinfo @@ -0,0 +1,2 @@ +SHA256 (dnscrypt-proxy-0.9.3.tar.gz) = f1733e443a815da6789130f7718500304f2d90fbcdce863a5a5b98c9de06372b +SIZE (dnscrypt-proxy-0.9.3.tar.gz) = 1368327 diff --git a/dns/dnscrypt-proxy/files/dnscrypt-proxy.in b/dns/dnscrypt-proxy/files/dnscrypt-proxy.in new file mode 100644 index 000000000000..f833fbde74cb --- /dev/null +++ b/dns/dnscrypt-proxy/files/dnscrypt-proxy.in @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: dnscrypt-proxy +# REQUIRE: LOGIN cleanvar +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy: +# +# dnscrypt_proxy_enable="YES": Set to NO by default. +# Set it to YES to enable dnscrypt-proxy. + +. /etc/rc.subr + +name=dnscrypt_proxy +rcvar=dnscrypt_proxy_enable + +stop_cmd="dnscrypt_proxy_stop" + +load_rc_config dnscrypt_proxy + +: {dnscrypt_proxy_enable:="NO"} + +command=%%PREFIX%%/sbin/dnscrypt-proxy +procname=%%PREFIX%%/sbin/dnscrypt-proxy +pidfile=/var/run/dnscrypt-proxy.pid +logdir=/var/log/dnscrypt-proxy.log + +command_args="-d -p ${pidfile} -l ${logdir}" + +dnscrypt_proxy_stop() { + kill -KILL `cat ${pidfile}` 2> /dev/null && echo "Killed ${name}." + } + +run_rc_command "$1" diff --git a/dns/dnscrypt-proxy/files/pkg-message.in b/dns/dnscrypt-proxy/files/pkg-message.in new file mode 100644 index 000000000000..d99cf15d8503 --- /dev/null +++ b/dns/dnscrypt-proxy/files/pkg-message.in @@ -0,0 +1,18 @@ + +This port/software comes all 'working out of the box'. + +By default this port is using OpenDNS' resolvers, +but other nameservers are also possible. + +To view available options, run: +%%PREFIX%%/sbin/dnscrypt-proxy --help +or read the manual: `man dnscrypt-proxy` + +You might like to adjust +%%ETCDIR%%/rc.d/dnscrypt-proxy +accordingly with your needs and/or preferences. + +To enable dnscrypt-proxy at boot: +echo dnscrypt_proxy_enable=\"YES\" >> /etc/rc.conf + + diff --git a/dns/dnscrypt-proxy/pkg-descr b/dns/dnscrypt-proxy/pkg-descr new file mode 100644 index 000000000000..82a17dce58d6 --- /dev/null +++ b/dns/dnscrypt-proxy/pkg-descr @@ -0,0 +1,6 @@ +DNSCrypt is a piece of lightweight software that everyone +should use to boost online privacy and security. It works +by encrypting all DNS traffic between the user and OpenDNS, +preventing any spying, spoofing or man-in-the-middle attacks. + +WWW: https://www.opendns.com/technology/dnscrypt/ diff --git a/dns/dnscrypt-proxy/pkg-plist b/dns/dnscrypt-proxy/pkg-plist new file mode 100644 index 000000000000..a7ec8dfd8e43 --- /dev/null +++ b/dns/dnscrypt-proxy/pkg-plist @@ -0,0 +1,2 @@ +@stopdaemon dnscrypt-proxy +sbin/dnscrypt-proxy