Index: head/dns/dnscrypt-proxy/Makefile =================================================================== --- head/dns/dnscrypt-proxy/Makefile (revision 396938) +++ head/dns/dnscrypt-proxy/Makefile (revision 396939) @@ -1,40 +1,52 @@ # Created by: Leo Vandewoestijne # $FreeBSD$ PORTNAME= dnscrypt-proxy PORTVERSION= 1.6.0 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= dns MASTER_SITES= http://download.dnscrypt.org/dnscrypt-proxy/ \ http://www.dns-lab.com/downloads/dnscrypt-proxy/ MAINTAINER= freebsd@dns-lab.com COMMENT= Boost privacy and security of DNS LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libsodium.so:${PORTSDIR}/security/libsodium GNU_CONFIGURE= yes USES= execinfo gmake -SUB_FILES= pkg-message +OPTIONS_DEFINE= DOCS +OPTIONS_SINGLE= RCWHICH +OPTIONS_SINGLE_RCWHICH= RCSINGLE RCMULTI +RCWHICH_DESC= rc script to use: +RCSINGLE_DESC= use default rc script for single daemon +RCMULTI_DESC= use experimental rc script for multiple instances +OPTIONS_DEFAULT=RCSINGLE +.include + +.if ${PORT_OPTIONS:MRCMULTI} +USE_RC_SUBR= ${PORTNAME}_multi +SUB_FILES= pkg-message_multi +.else USE_RC_SUBR= ${PORTNAME} +SUB_FILES= pkg-message +.endif USERS= _dnscrypt-proxy PORTDOCS= AUTHORS ChangeLog INSTALL NEWS README \ README-PLUGINS.markdown README-WINDOWS.markdown \ README.markdown TECHNOTES THANKS - -OPTIONS_DEFINE= DOCS post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} ${INSTALL_MAN} ${WRKSRC}/man/dnscrypt-proxy.8 ${STAGEDIR}${MAN8PREFIX}/man/man8 ${INSTALL_MAN} ${WRKSRC}/man/hostip.8 ${STAGEDIR}${MAN8PREFIX}/man/man8 .include Index: head/dns/dnscrypt-proxy/files/dnscrypt-proxy_multi.in =================================================================== --- head/dns/dnscrypt-proxy/files/dnscrypt-proxy_multi.in (nonexistent) +++ head/dns/dnscrypt-proxy/files/dnscrypt-proxy_multi.in (revision 396939) @@ -0,0 +1,71 @@ +#!/bin/sh +# +# $FreeBSD: $ +# +# PROVIDE: dnscrypt_proxy +# REQUIRE: SERVERS cleanvar +# BEFORE: named local_unbound unbound +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy: +# +# dnscrypt_proxy_instances (str): Set to "dnscrypt_proxy" by default. +# List of dnscrypt_proxy instance id's, +# e.g. "dnscrypt_proxy_1 dnscrypt_proxy_2", etc. +# {instance_id}_enable (bool): Set to NO by default. +# Set to YES to enable dnscrypt-proxy. +# {instance_id}_uid (str): Set to "_dnscrypt-proxy" by default. +# User to switch to after starting. +# {instance_id}_resolver (str): Set to "opendns" by default. +# Choose a different upstream resolver. +# {instance_id}_pidfile (str): default: "/var/run/dnscrypt-proxy.pid" +# Location of pid file. +# {instance_id}_logfile (str): default: "/var/log/dnscrypt-proxy.log" +# Location of log file. +# +# To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2 +# and add the following to rc.conf: +# ifconfig_lo0_alias0="inet 127.0.0.2 netmask 0xffffffff" +# dnscrypt_proxy_flags='-a 127.0.0.2' + +. /etc/rc.subr + +name=dnscrypt_proxy +rcvar=dnscrypt_proxy_enable + +load_rc_config ${name} + +: ${dnscrypt_proxy_instances="${name}"} +: ${dnscrypt_proxy_enable:=NO} + +dnscrypt_proxy_enable_tmp=${dnscrypt_proxy_enable} + +command=%%PREFIX%%/sbin/dnscrypt-proxy +procname=%%PREFIX%%/sbin/dnscrypt-proxy + +for i in $dnscrypt_proxy_instances; do + name=${i} + + eval ${name}_enable=${dnscrypt_proxy_enable_tmp} + rcvar=${name}_enable + + load_rc_config ${i} + + eval dnscrypt_proxy_uid_tmp=\${${i}_uid} + eval dnscrypt_proxy_resolver_tmp=\${${i}_resolver} + eval dnscrypt_proxy_pidfile_tmp=\${${i}_pidfile} + eval dnscrypt_proxy_logfile_tmp=\${${i}_logfile} + +: ${dnscrypt_proxy_uid_tmp:=_dnscrypt-proxy} # User to run daemon as +: ${dnscrypt_proxy_resolver_tmp:=opendns} # resolver to use +: ${dnscrypt_proxy_pidfile_tmp:=/var/run/${i}.pid} # Path to pid file +: ${dnscrypt_proxy_logfile_tmp:=/var/log/${i}.log} # Path to log file + + command_args="-d -p ${dnscrypt_proxy_pidfile_tmp} -l ${dnscrypt_proxy_logfile_tmp} -u ${dnscrypt_proxy_uid_tmp} -R ${dnscrypt_proxy_resolver_tmp}" + + pidfile=${dnscrypt_proxy_pidfile_tmp} + + _rc_restart_done=false # workaround for: service dnscrypt-proxy restart + + run_rc_command "$1" +done Property changes on: head/dns/dnscrypt-proxy/files/dnscrypt-proxy_multi.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/dns/dnscrypt-proxy/files/pkg-message.in =================================================================== --- head/dns/dnscrypt-proxy/files/pkg-message.in (revision 396938) +++ head/dns/dnscrypt-proxy/files/pkg-message.in (revision 396939) @@ -1,18 +1,13 @@ This port/software comes all 'working out of the box'. -By default this port is using OpenDNS' resolvers, -but other nameservers are also possible. +By default this port is using OpenDNS' resolvers, other services are 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 +echo dnscrypt_proxy_flags=\"-a 127.0.0.2\" >> /etc/rc.conf +To view available options, run: +%%PREFIX%%/sbin/dnscrypt-proxy --help +or read the manual: `man dnscrypt-proxy` Index: head/dns/dnscrypt-proxy/files/pkg-message_multi.in =================================================================== --- head/dns/dnscrypt-proxy/files/pkg-message_multi.in (nonexistent) +++ head/dns/dnscrypt-proxy/files/pkg-message_multi.in (revision 396939) @@ -0,0 +1,19 @@ + +This port/software comes all 'working out of the box'. + +By default this port is using OpenDNS' resolvers, other services are possible. + +To enable dnscrypt-proxy at boot: +echo dnscrypt_proxy_enable=\"YES\" >> /etc/rc.conf +echo dnscrypt_proxy_instances=\"dnscrypt_proxy_1 dnscrypt_proxy_2 dnscrypt_proxy_3\" >> /etc/rc.conf +echo dnscrypt_proxy_1_resolver=\"soltysiak\" >> /etc/rc.conf +echo dnscrypt_proxy_1_flags=\"-a 127.0.0.2\" >> /etc/rc.conf +echo dnscrypt_proxy_2_resolver=\"okturtles\" >> /etc/rc.conf +echo dnscrypt_proxy_2_flags=\"-a 127.0.0.3\" >> /etc/rc.conf +echo dnscrypt_proxy_3_resolver=\"cypherpunk\" >> /etc/rc.conf +echo dnscrypt_proxy_3_flags=\"-a 127.0.0.4\" >> /etc/rc.conf + +To view available options, run: +%%PREFIX%%/sbin/dnscrypt-proxy --help +or read the manual: `man dnscrypt-proxy` + Property changes on: head/dns/dnscrypt-proxy/files/pkg-message_multi.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property