View | Details | Raw Unified | Return to bug 225924 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (+66 lines)
Line 0 Link Here
1
# Created by: Moritz Warning <moritzwarning@web.de>
2
# $FreeBSD$
3
4
PORTNAME=	kadnode
5
DISTVERSIONPREFIX=	v
6
DISTVERSION=	2.2.0
7
PORTREVISION=	0
8
CATEGORIES=	dns
9
10
MAINTAINER=	moritzwarning@web.de
11
COMMENT=	P2P name resolution daemon
12
13
LICENSE=	MIT
14
LICENSE_FILE=	${WRKSRC}/LICENSE
15
16
USES=		gmake
17
USE_GITHUB=	yes
18
GH_ACCOUNT=	mwarning
19
GH_PROJECT=	KadNode
20
USE_RC_SUBR=	kadnode
21
22
MAKE_ENV=	FEATURES="${FEATURES}" LFLAGS="${LDFLAGS}"
23
SUB_FILES=	kadnode.conf
24
25
OPTIONS_DEFINE=	AUTH CMD DEBUG DNS LPD NATPMP NSS UPNP
26
OPTIONS_DEFAULT=	AUTH CMD LPD NSS
27
28
AUTH_DESC=	Authorization support based on mbedtls
29
CMD_DESC=	Command line control tool kadnode-ctl
30
DEBUG_DESC=	Build with debug messages and symbols
31
DNS_DESC=	Include local DNS interface
32
LPD_DESC=	Local peer discovery
33
NATPMP_DESC=	NAT-PMP support (remote port forwarding on the router)
34
NSS_DESC=	Name Service Switch support to intercept host queries
35
UPNP_DESC=	UPnP support (remote port forwarding on the router)
36
37
AUTH_LIB_DEPENDS=	libmbedtls.so:security/mbedtls
38
AUTH_VARS=		FEATURES+="bob tls"
39
40
CMD_VARS=		FEATURES+="cmd"
41
42
DEBUG_VARS=		FEATURES+="debug"
43
44
DNS_VARS=		FEATURES+="dns"
45
46
LPD_VARS=		FEATURES+="lpd"
47
48
NATPMP_LIB_DEPENDS=	libnatpmp.so:net/libnatpmp
49
NATPMP_VARS=		FEATURES+="natpmp"
50
51
NSS_VARS=		FEATURES+="nss"
52
53
UPNP_LIB_DEPENDS=	libminiupnpc.so:net/miniupnpc
54
UPNP_VARS=		FEATURES+="upnp"
55
56
do-install:
57
	${INSTALL_PROGRAM} ${WRKSRC}/build/kadnode ${STAGEDIR}${PREFIX}/bin/
58
	${RLN} ${STAGEDIR}${PREFIX}/bin/kadnode ${STAGEDIR}${PREFIX}/bin/kadnode-ctl
59
	${INSTALL_LIB} ${WRKSRC}/build/libnss_kadnode.so.2 ${STAGEDIR}${PREFIX}/lib/nss_kadnode.so.1
60
	${RLN} ${STAGEDIR}${PREFIX}/lib/nss_kadnode.so.1 ${STAGEDIR}${PREFIX}/lib/nss_kadnode.so
61
	${MKDIR} ${STAGEDIR}${ETCDIR}
62
	${INSTALL_DATA} ${WRKSRC}/misc/peers.txt ${STAGEDIR}${ETCDIR}/peers.txt.sample
63
	${INSTALL_DATA} ${WRKDIR}/kadnode.conf ${STAGEDIR}${ETCDIR}/kadnode.conf.sample
64
	${INSTALL_MAN} ${WRKSRC}/misc/manpage ${STAGEDIR}${MANPREFIX}/man/man1/kadnode.1
65
66
.include <bsd.port.mk>
(-)distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1526574032
2
SHA256 (mwarning-KadNode-v2.2.0_GH0.tar.gz) = 1b3ccaa01cbb7548ef268d8b562059452826dc774529303c494418d1a450ca97
3
SIZE (mwarning-KadNode-v2.2.0_GH0.tar.gz) = 446098
(-)files/kadnode.conf.in (+29 lines)
Line 0 Link Here
1
# Load peers at startup from this file and save peers to this file at shutdown
2
--peerfile %%PREFIX%%/etc/kadnode/peers.txt
3
4
# For authentication via TLS, x509 certificates need to be provided.
5
# The server needs a tuple of the certificate file and private key file:
6
# --tls-server-cert mydomain.crt,mydomain.key
7
# The domain in the Common Name field of the certificate will be announced.
8
#
9
# For domain lookup, we need to provide appropiate CA certificates.
10
# Try various locations:
11
--tls-client-cert %%LOCALBASE%%/share/certs
12
13
# As an alternative, create a secret/public key via 'kadnode --bob-create-key'
14
# and load the secret keys as PEM file:
15
# --bob-load-key <secret-key-pem-file>
16
#
17
# Other nodes can use <public-key-hex>.p2p in the browser to resolve the node.
18
19
# Enable DNS proxy behavior. Reads /etc/resolv.conf by default.
20
# --dns-proxy-enable
21
#
22
# Or specify a DNS server by IP address:
23
# --dns-proxy-server <IP-address>
24
25
# Disable UPnP/NAT-PMP support
26
# --disable-forwarding
27
28
# Disable multicast peer discovery
29
# --lpd-disable
(-)files/kadnode.in (+20 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# PROVIDE: kadnode
4
# REQUIRE: SERVERS
5
# BEFORE: DAEMON
6
# KEYWORD: shutdown
7
8
. /etc/rc.subr
9
10
name=kadnode
11
rcvar=kadnode_enable
12
13
command="%%PREFIX%%/bin/kadnode"
14
command_args="--config %%PREFIX%%/etc/kadnode/kadnode.conf --pidfile $pidfile --daemon"
15
pidfile="/var/run/kadnode.pid"
16
required_files="%%PREFIX%%/etc/kadnode/kadnode.conf"
17
18
load_rc_config $name
19
: ${kadnode_enable:=yes}
20
run_rc_command "$1"
(-)pkg-descr (+5 lines)
Line 0 Link Here
1
KadNode is a small decentralized DNS resolver that can use existing
2
public key infrastructures. It utilizes the BitTorrent P2P network
3
and mbedtls for TLS/crypto support.
4
5
WWW: https://github.com/mwarning/KadNode
(-)pkg-message (+6 lines)
Line 0 Link Here
1
In order to resolve domains using kadnode all over the system, add this
2
line to your /etc/nsswitch.conf:
3
4
hosts: kadnode dns
5
6
If the hosts line already exists, just add kadnode before the dns entry.
(-)pkg-plist (+7 lines)
Line 0 Link Here
1
bin/kadnode
2
bin/kadnode-ctl
3
@sample %%ETCDIR%%/kadnode.conf.sample
4
@sample %%ETCDIR%%/peers.txt.sample
5
lib/nss_kadnode.so
6
lib/nss_kadnode.so.1
7
man/man1/kadnode.1.gz

Return to bug 225924