View | Details | Raw Unified | Return to bug 195698
Collapse All | Expand All

(-)dnscrypt-proxy/Makefile (-4 / +17 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	dnscrypt-proxy
4
PORTNAME=	dnscrypt-proxy
5
PORTVERSION=	1.4.3
5
PORTVERSION=	1.4.3
6
PORTREVISION=	1
6
CATEGORIES=	dns
7
CATEGORIES=	dns
7
MASTER_SITES=	http://download.dnscrypt.org/dnscrypt-proxy/ \
8
MASTER_SITES=	http://download.dnscrypt.org/dnscrypt-proxy/ \
8
		http://www.dns-lab.com/downloads/dnscrypt-proxy/
9
		http://www.dns-lab.com/downloads/dnscrypt-proxy/
Lines 18-26 Link Here
18
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
19
USES=		execinfo gmake
20
USES=		execinfo gmake
20
21
21
SUB_FILES=	pkg-message
22
OPTIONS_DEFINE=	DOCS
22
23
OPTIONS_SINGLE=	RCWHICH
24
OPTIONS_SINGLE_RCWHICH=	RCSINGLE RCMULTI
25
RCWHICH_DESC=	rc script to use:
26
RCSINGLE_DESC=	use default rc script for single daemon
27
RCMULTI_DESC=	use experimental rc script for multiple instances
28
OPTIONS_DEFAULT=RCSINGLE
29
30
.include <bsd.port.options.mk>
31
32
.if ${PORT_OPTIONS:MRCMULTI}
33
USE_RC_SUBR=	${PORTNAME}_multi
34
SUB_FILES=	pkg-message_multi
35
.else
23
USE_RC_SUBR=	${PORTNAME}
36
USE_RC_SUBR=	${PORTNAME}
37
SUB_FILES=	pkg-message
38
.endif
24
39
25
USERS=		_dnscrypt-proxy
40
USERS=		_dnscrypt-proxy
26
41
Lines 28-35 Link Here
28
		README-PLUGINS.markdown README-WINDOWS.markdown \
43
		README-PLUGINS.markdown README-WINDOWS.markdown \
29
		README.markdown TECHNOTES THANKS
44
		README.markdown TECHNOTES THANKS
30
45
31
OPTIONS_DEFINE=	DOCS
32
33
post-install:
46
post-install:
34
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
47
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
35
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
48
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
(-)dnscrypt-proxy/files/dnscrypt-proxy_multi.in (+71 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: $
4
#
5
# PROVIDE: dnscrypt_proxy
6
# REQUIRE: SERVERS cleanvar
7
# BEFORE: named local_unbound unbound
8
# KEYWORD: shutdown
9
#
10
# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy:
11
#
12
# dnscrypt_proxy_instances (str): Set to "dnscrypt_proxy" by default.
13
#                                 List of dnscrypt_proxy instance id's,
14
#                                 e.g. "dnscrypt_proxy_1 dnscrypt_proxy_2", etc.
15
# {instance_id}_enable (bool):    Set to NO by default.
16
#                                 Set to YES to enable dnscrypt-proxy.
17
# {instance_id}_uid (str):        Set to "_dnscrypt-proxy" by default.
18
#                              	  User to switch to after starting.
19
# {instance_id}_resolver (str):   Set to "opendns" by default.
20
#                              	  Choose a different upstream resolver.
21
# {instance_id}_pidfile (str):    default: "/var/run/dnscrypt-proxy.pid"
22
#                              	  Location of pid file.
23
# {instance_id}_logfile (str):	  default: "/var/log/dnscrypt-proxy.log"
24
#                                 Location of log file.
25
#
26
# To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2
27
# and add the following to rc.conf:
28
# ifconfig_lo0_alias0="inet 127.0.0.2 netmask 0xffffffff"
29
# dnscrypt_proxy_flags='-a 127.0.0.2'
30
31
. /etc/rc.subr
32
33
name=dnscrypt_proxy
34
rcvar=dnscrypt_proxy_enable
35
36
load_rc_config ${name}
37
38
: ${dnscrypt_proxy_instances="${name}"}
39
: ${dnscrypt_proxy_enable:=NO}
40
41
dnscrypt_proxy_enable_tmp=${dnscrypt_proxy_enable}
42
43
command=%%PREFIX%%/sbin/dnscrypt-proxy
44
procname=%%PREFIX%%/sbin/dnscrypt-proxy
45
46
for i in $dnscrypt_proxy_instances; do
47
    name=${i}
48
49
    eval ${name}_enable=${dnscrypt_proxy_enable_tmp}
50
    rcvar=${name}_enable
51
52
    load_rc_config ${i}
53
54
    eval dnscrypt_proxy_uid_tmp=\${${i}_uid}
55
    eval dnscrypt_proxy_resolver_tmp=\${${i}_resolver}
56
    eval dnscrypt_proxy_pidfile_tmp=\${${i}_pidfile}
57
    eval dnscrypt_proxy_logfile_tmp=\${${i}_logfile}
58
59
:   ${dnscrypt_proxy_uid_tmp:=_dnscrypt-proxy}       # User to run daemon as
60
:   ${dnscrypt_proxy_resolver_tmp:=opendns}          # resolver to use
61
:   ${dnscrypt_proxy_pidfile_tmp:=/var/run/${i}.pid} # Path to pid file
62
:   ${dnscrypt_proxy_logfile_tmp:=/var/log/${i}.log} # Path to log file
63
64
    command_args="-d -p ${dnscrypt_proxy_pidfile_tmp} -l ${dnscrypt_proxy_logfile_tmp} -u ${dnscrypt_proxy_uid_tmp} -R ${dnscrypt_proxy_resolver_tmp}"
65
66
    pidfile=${dnscrypt_proxy_pidfile_tmp}
67
68
    _rc_restart_done=false # workaround for: service dnscrypt-proxy restart
69
70
    run_rc_command "$1"
71
done
(-)dnscrypt-proxy/files/pkg-message.in (-10 / +5 lines)
Lines 1-18 Link Here
1
1
2
This port/software comes all 'working out of the box'.
2
This port/software comes all 'working out of the box'.
3
3
4
By default this port is using OpenDNS' resolvers,
4
By default this port is using OpenDNS' resolvers, other services are possible.
5
but other nameservers are also possible.
6
7
To view available options, run:
8
%%PREFIX%%/sbin/dnscrypt-proxy --help
9
or read the manual: `man dnscrypt-proxy`
10
11
You might like to adjust
12
%%ETCDIR%%/rc.d/dnscrypt-proxy
13
accordingly with your needs and/or preferences.
14
5
15
To enable dnscrypt-proxy at boot:
6
To enable dnscrypt-proxy at boot:
16
echo dnscrypt_proxy_enable=\"YES\" >> /etc/rc.conf
7
echo dnscrypt_proxy_enable=\"YES\" >> /etc/rc.conf
8
echo dnscrypt_proxy_flags=\"-a 127.0.0.2\" >> /etc/rc.conf
17
9
10
To view available options, run:
11
%%PREFIX%%/sbin/dnscrypt-proxy --help
12
or read the manual: `man dnscrypt-proxy`
18
13
(-)dnscrypt-proxy/files/pkg-message_multi.in (+19 lines)
Line 0 Link Here
1
2
This port/software comes all 'working out of the box'.
3
4
By default this port is using OpenDNS' resolvers, other services are possible.
5
6
To enable dnscrypt-proxy at boot:
7
echo dnscrypt_proxy_enable=\"YES\"            >> /etc/rc.conf
8
echo dnscrypt_proxy_instances=\"dnscrypt_proxy_1 dnscrypt_proxy_2 dnscrypt_proxy_3\" >> /etc/rc.conf
9
echo dnscrypt_proxy_1_resolver=\"soltysiak\"  >> /etc/rc.conf
10
echo dnscrypt_proxy_1_flags=\"-a 127.0.0.2\"  >> /etc/rc.conf
11
echo dnscrypt_proxy_2_resolver=\"okturtles\"  >> /etc/rc.conf
12
echo dnscrypt_proxy_2_flags=\"-a 127.0.0.3\"  >> /etc/rc.conf
13
echo dnscrypt_proxy_3_resolver=\"cypherpunk\" >> /etc/rc.conf
14
echo dnscrypt_proxy_3_flags=\"-a 127.0.0.4\"  >> /etc/rc.conf
15
16
To view available options, run:
17
%%PREFIX%%/sbin/dnscrypt-proxy --help
18
or read the manual: `man dnscrypt-proxy`
19

Return to bug 195698