summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-07-31 14:26:30 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-07-31 14:26:30 +0000
commit65a88eabbad56c35d6f7418da99502bd44b6a92e (patch)
treed0804a02c7f6517936c679bccd248ff8a9c139c4
parentUpdate to the 20160728 snapshot of GCC 6. (diff)
New port: net/cjdns
Cjdns implements an encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing. This provides near-zero-configuration networking, and prevents many of the security and scalability issues that plague existing networks. WWW: https://github.com/cjdelisle/cjdns PR: 210730 Submitted by: Yuri Victorovich <yuri@rawbw.com>
Notes
Notes: svn path=/head/; revision=419383
-rw-r--r--net/Makefile1
-rw-r--r--net/cjdns/Makefile42
-rw-r--r--net/cjdns/distinfo3
-rw-r--r--net/cjdns/files/cjdns.in23
-rw-r--r--net/cjdns/files/pkg-message.in38
-rw-r--r--net/cjdns/pkg-descr6
6 files changed, 113 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 42bbdfca84ee..f2883a32f36c 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -68,6 +68,7 @@
SUBDIR += cf
SUBDIR += chrony
SUBDIR += citrix_ica
+ SUBDIR += cjdns
SUBDIR += clamz
SUBDIR += cloud-init
SUBDIR += clusterit
diff --git a/net/cjdns/Makefile b/net/cjdns/Makefile
new file mode 100644
index 000000000000..dbc795c693ad
--- /dev/null
+++ b/net/cjdns/Makefile
@@ -0,0 +1,42 @@
+# Created by: Yuri Victorovich <yuri@rawbw.com>
+# $FreeBSD$
+
+PORTNAME= cjdns
+PORTVERSION= 17.4
+DISTVERSIONPREFIX= cjdns-v
+CATEGORIES= net security
+
+MAINTAINER= yuri@rawbw.com
+COMMENT= Routing engine designed for security, scalability, speed
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= node:www/node \
+ bash:shells/bash
+
+USE_GITHUB= yes
+GH_ACCOUNT= cjdelisle
+
+USES= gmake python
+USE_RC_SUBR= cjdns
+SUB_FILES= cjdns pkg-message
+SUB_LIST= LOCALBASE=${LOCALBASE}
+PLIST_FILES= bin/cjdroute bin/run-cjdroute man/man5/cjdroute.conf.5.gz
+
+post-patch:
+ @${REINPLACE_CMD} -i '' -e 's|/etc/|${LOCALBASE}/etc/|g' \
+ ${WRKSRC}/contrib/sh/run-cjdroute.sh
+
+do-build:
+ cd ${WRKSRC} && ./do
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/cjdroute ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/contrib/sh/run-cjdroute.sh ${STAGEDIR}${PREFIX}/bin/run-cjdroute
+ ${INSTALL_MAN} ${WRKSRC}/doc/man/cjdroute.conf.5 ${STAGEDIR}${MANPREFIX}/man/man5
+
+do-test:
+ ${WRKSRC}/cjdroute --bench
+
+.include <bsd.port.mk>
diff --git a/net/cjdns/distinfo b/net/cjdns/distinfo
new file mode 100644
index 000000000000..189ed085d882
--- /dev/null
+++ b/net/cjdns/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1467325399
+SHA256 (cjdelisle-cjdns-cjdns-v17.4_GH0.tar.gz) = 2f30aa4d2cc96a6c1f00e873df19b7b213cca1af716d74a091f59aa98b5758c4
+SIZE (cjdelisle-cjdns-cjdns-v17.4_GH0.tar.gz) = 3955198
diff --git a/net/cjdns/files/cjdns.in b/net/cjdns/files/cjdns.in
new file mode 100644
index 000000000000..e4dc1a0ae94f
--- /dev/null
+++ b/net/cjdns/files/cjdns.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: cjdns
+# REQUIRE: LOGIN
+
+. /etc/rc.subr
+
+name="cjdns"
+rcvar=cjdns_enable
+command="%%PREFIX%%/bin/cjdroute"
+command_args="< %%PREFIX%%/etc/cjdroute.conf"
+
+if expr "$1" : ".*start" > /dev/null && ! [ -r %%PREFIX%%/etc/cjdroute.conf ]; then
+ %%PREFIX%%/bin/cjdroute --genconf > %%PREFIX%%/etc/cjdroute.conf &&
+ echo "$name: (!!!) generated the initial config file %%PREFIX%%/etc/cjdroute.conf" &&
+ echo "$name: (!!!) keep this file secret because it contains your secret key"
+ chmod 0600 %%PREFIX%%/etc/cjdroute.conf
+fi
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/cjdns/files/pkg-message.in b/net/cjdns/files/pkg-message.in
new file mode 100644
index 000000000000..6fcec078b207
--- /dev/null
+++ b/net/cjdns/files/pkg-message.in
@@ -0,0 +1,38 @@
+======================================================================
+You installed CJDNS: IPv6 routing engine
+
+It is recommended to run CJDNS as a service:
+# sysrc cjdns_enable="YES"
+# service cjdns start
+
+When started the first time, CJDNS will create the config file
+%%PREFIX%%/etc/cjdroute.conf that you should edit to make CJDNS connected:
+* You may want to add some nodes to connect to the section "connectTo"
+ from some of these sites:
+ * https://pad.meshwith.me/p/public
+ * http://cjdns.me/
+ * https://github.com/hyperboria/peers
+* You may want to uncomment "tunDevice" to make CJDNS always use the same
+ tun device.
+
+In order to be able to open IPv6 websites available through CJDNS network
+that you connect to, you need to add the IPv6 default route:
+# route -6 add default fc00::1
+
+In order to create an IPv4 or IPv6 VPN, on the server in the section
+ipTunnel/allowedConnections of the config file you need to add the public
+keys of the clients, and to define the VPN network. On the clients you
+only need to add the public key of the server in the section
+ipTunnel/outgoingConnections. You may also need to bridge the tunN
+interface on the server to connect the segments of the VPN network.
+
+Here are some websites on CJDNS Hyperboria network:
+* http://socialno.de/ - social network
+* https://rows.io/ - Jabber server
+* http://forum.meshbits.io/ - forums
+* http://h.fc00.org/ - network map
+
+Warning: When CJDNS daemon is connected to outside network, tunN
+interface will generally directly expose your computer to that network,
+bypassing the regular firewall that you normally use.
+======================================================================
diff --git a/net/cjdns/pkg-descr b/net/cjdns/pkg-descr
new file mode 100644
index 000000000000..dd28d0aba9f8
--- /dev/null
+++ b/net/cjdns/pkg-descr
@@ -0,0 +1,6 @@
+Cjdns implements an encrypted IPv6 network using public-key cryptography for
+address allocation and a distributed hash table for routing. This provides
+near-zero-configuration networking, and prevents many of the security and
+scalability issues that plague existing networks.
+
+WWW: https://github.com/cjdelisle/cjdns