diff options
Diffstat (limited to 'unmaintained')
-rw-r--r-- | unmaintained/quicktun/APKBUILD | 57 | ||||
-rw-r--r-- | unmaintained/quicktun/quicktun.conf | 47 | ||||
-rwxr-xr-x | unmaintained/quicktun/quicktun.initd | 25 | ||||
-rwxr-xr-x | unmaintained/quicktun/quicktun.pre-install | 6 |
4 files changed, 135 insertions, 0 deletions
diff --git a/unmaintained/quicktun/APKBUILD b/unmaintained/quicktun/APKBUILD new file mode 100644 index 0000000000..f1ede540db --- /dev/null +++ b/unmaintained/quicktun/APKBUILD @@ -0,0 +1,57 @@ +# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr> +# Maintainer: Johannes Matheis <jomat+alpinebuild@jmt.gr> +pkgname=quicktun +pkgver=2.2.4 +pkgrel=5 +pkgdesc="Simple and secure VPN software using NaCl encryption" +url="http://wiki.ucis.nl/QuickTun" +arch="all" +license="BSD" +depends="" +depends_dev="" +makedepends="$depends_dev linux-headers tar libsodium-dev" +install="quicktun.pre-install" +subpackages="$pkgname-keypair" +source="http://oss.ucis.nl/${pkgname}/src/${pkgname}-${pkgver}.tgz + quicktun.initd + quicktun.conf" + +_builddir="$srcdir/${pkgname}-${pkgver}" +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./build.sh +} + +package() { + cd "$_builddir" + install -D out/quicktun.combined "${pkgdir}/usr/bin/quicktun.combined" + ln -s quicktun.combined "${pkgdir}/usr/bin/quicktun" + install -D -m600 ${srcdir}/quicktun.conf "${pkgdir}"/etc/quicktun/quicktun.conf + install -D -m755 ${srcdir}/quicktun.initd "${pkgdir}"/etc/init.d/quicktun +} + +keypair() { + pkgdesc="Tool to create a quicktun public/private keypair" + cd "$_builddir" + install -D out/quicktun.keypair "${subpkgdir}/usr/bin/quicktun.keypair" +} + +md5sums="5e27c9b1ccae0c6d6e4b30ca476f910d quicktun-2.2.4.tgz +08544bcdaa8148041535e5622fad6008 quicktun.initd +097c43021134f43294c894464099a8fb quicktun.conf" +sha256sums="652383d30f4a1ac2d42500e676f4c8590efaeea21a1e40a3ad1c332aa2ba3a0c quicktun-2.2.4.tgz +185430ca6d9d27144d3e2b81edaa10f425c29b0a7d7296bdde322134cef3ca7f quicktun.initd +787a37b2fbae6b44adebd422e6476da08c37c8db6bf0ac35a8d790ba4c50fe59 quicktun.conf" +sha512sums="da60fc39d8e85d5b2c162633840b887be3fd58d9f2b3a99fe605fa13546e4f53878ce6246d835b7931e42193fb044330c539b29751cdb6f54d025efc52041487 quicktun-2.2.4.tgz +3b9aa117800d23e84f4ac0ddfc37fe0499dc93514f72ab98d4cd315be201750f9acf2099268335a1774199d1f7310fc1b4c97f7ec7ba45740e9da5e0e89db959 quicktun.initd +6056ea4d4f8f8c58198a101b0f59f258e9318c3b57b6efbc6f3587665315b5b5990dee5662a27ee0e15a2333446c1d18b2a3650af7abbfbb4fe572c002b2a1b7 quicktun.conf" diff --git a/unmaintained/quicktun/quicktun.conf b/unmaintained/quicktun/quicktun.conf new file mode 100644 index 0000000000..6b839e80c5 --- /dev/null +++ b/unmaintained/quicktun/quicktun.conf @@ -0,0 +1,47 @@ +# To run multiple quicktun instances, copy this file to /etc/quicktun/example.conf, +# create a symlink /etc/init.d/quicktun.example -> quicktun +# and initialize the tunnel by issuing: rc-service quicktun.example start + +# interface name +#export INTERFACE= + +# set to 1 to operate in tun (IP), unset or 0 (recent versions only) for tap (Ethernet) mode +#export TUN_MODE=0 + +# set to 1 to include packet information header in wire packets, must be set on both sides if +# used; set to 2 to automatically add the packet information header for cross-platform compatibility +# (also compatible with USE_PI=0), some (BSD) kernels need USE_PI to be enabled for IPv6 support +#export USE_PI=0 + +# IP address or hostname of the remote end (use 0.0.0.0 for a floating/dynamic remote endpoint) +#export REMOTE_ADDRESS=0.0.0.0 + +# IP address or hostname of the local end, optional +#export LOCAL_ADDRESS= + +# local UDP port, optional, defaults to 2998 +#export LOCAL_PORT=2998 + +# remote UDP port, optional, defaults to LOCAL_PORT +#export REMOTE_PORT=${LOCAL_PORT} + +# allows the remote address and port to change when properly encrypted packets are received +#export REMOTE_FLOAT= + +# run specified command or script after the tunnel device has been opened +#export TUN_UP_SCRIPT= + +# drop privileges and change user and group IDs to specified username after setting up the tunnel +export SETUID=quicktun + +# nacl0, nacltai and salty (encrypted) protocols only: +#export PRIVATE_KEY= # local secret key in hexadecimal form (not needed for raw protocol) +#export PUBLIC_KEY= # remote public key in hexadecimal form (not needed for raw protocol) +#export PRIVATE_KEY_FILE= # file containing local secret key in binary or hexadecimal form (not needed for raw protocol) + +# nacltai (encrypted) protocol only: +# allowed time window for first received packet in seconds (positive number allows packets from history) +#export TIME_WINDOW= + +# the protocol to use, one of "raw", "nacl0" and "nacltai" +#export PROTOCOL=raw diff --git a/unmaintained/quicktun/quicktun.initd b/unmaintained/quicktun/quicktun.initd new file mode 100755 index 0000000000..0564c3e002 --- /dev/null +++ b/unmaintained/quicktun/quicktun.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run + +VPN=${SVCNAME#*.} +if [ ${SVCNAME} != "quicktun" ]; then + pidfile="/var/run/quicktun.${VPN}.pid" +else + pidfile="/var/run/quicktun.pid" +fi + +command=/usr/bin/quicktun + +start() { + if [ -e "/etc/quicktun/${VPN}.conf" ] + then + source "/etc/quicktun/${VPN}.conf" + else + eerror "Config /etc/quicktun/${VPN}.conf not found" + exit 1 + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec ${command} --pidfile ${pidfile} \ + --background --make-pidfile + eend $? +} diff --git a/unmaintained/quicktun/quicktun.pre-install b/unmaintained/quicktun/quicktun.pre-install new file mode 100755 index 0000000000..e010a88732 --- /dev/null +++ b/unmaintained/quicktun/quicktun.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S quicktun 2>/dev/null +adduser -S -D -H -h /var/run/quicktun -s /sbin/nologin -G quicktun -g "quicktun user" quicktun 2>/dev/null + +exit 0 |