summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatrio2015-12-16 11:15:55 +0300
committerNatrio2015-12-16 11:15:55 +0300
commit3dc4bb60253fabc4eef31f2b8e7e210648386c2c (patch)
tree7a7710b8bf6a488b27a315bae0d23ba67251b810
parent8ef8f2a02f4bcb9b5a1334c2f7cc24193e0d95f4 (diff)
downloadaur-3dc4bb60253fabc4eef31f2b8e7e210648386c2c.tar.gz
tun-cfg update to v1.7, patch for build with the new bison
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD12
-rw-r--r--README.tun-cfg6
-rwxr-xr-xtun-cfg24
4 files changed, 40 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 098ea6f5a348..ac1768917831 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Wed Dec 16 08:12:25 UTC 2015
pkgbase = vtun
pkgdesc = The easiest way to create Virtual Tunnels over TCP/IP networks with traffic shaping, compression, encryption and IPv6 support.
pkgver = 3.0.3.2013.d
- pkgrel = 5
+ pkgrel = 6
url = http://vtun.sourceforge.net/
install = vtun.install
arch = i686
@@ -15,6 +17,7 @@ pkgbase = vtun
backup = etc/vtund.conf
backup = etc/tun-cfg.conf
source = http://downloads.sourceforge.net/project/vtun/vtun/3.0.3/vtun-3.0.3.tar.gz
+ source = https://gist.githubusercontent.com/Mic92/f2d0980682a3ad2247b7/raw/9c2045facaa1f82420b84c581aeeef9ba96fd0c7/0001-fix-bison-compile-error.patch
source = cvs-2013.patch
source = openlog.patch
source = 00-sslauth.patch
@@ -33,6 +36,7 @@ pkgbase = vtun
source = tun-cfg.conf
source = README.tun-cfg
sha512sums = 5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54
+ sha512sums = 178f8cfc67f5de4b893bd0790f637c8e6988c4a317428330a7690d01ede0368920de8bcf8a1a08ad74300b772571d7e3d7a063cbfc685bf55dd4651f64d56558
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index df12ec0e1b30..b27e31a2b340 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,15 +4,19 @@
pkgname=vtun
pkgver=3.0.3.2013.d
_pkgver=3.0.3
-pkgrel=5
+pkgrel=6
pkgdesc="The easiest way to create Virtual Tunnels over TCP/IP networks with traffic shaping, compression, encryption and IPv6 support."
arch=('i686' 'x86_64' 'armv7h' 'armv6h')
url="http://vtun.sourceforge.net/"
license=('GPL')
depends=('openssl' 'zlib' 'lzo2')
backup=('etc/vtund.conf' 'etc/tun-cfg.conf')
-source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${_pkgver}/${pkgname}-${_pkgver}.tar.gz" cvs-2013.patch openlog.patch 00-sslauth.patch 01-pidfile.patch 02-dumpfile.patch 03-signedness-warnings.patch 04-implicit-pointer-conversions.patch 05-unix98pty.patch 06-ipv6.patch 07-dual-family-transport.patch vtund-ipv6-client.conf vtund-ipv6-server.conf android-dev.patch tun-cat.c tun-cfg tun-cfg.conf README.tun-cfg)
-sha512sums=('5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54' SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP)
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${_pkgver}/${pkgname}-${_pkgver}.tar.gz"
+"https://gist.githubusercontent.com/Mic92/f2d0980682a3ad2247b7/raw/9c2045facaa1f82420b84c581aeeef9ba96fd0c7/0001-fix-bison-compile-error.patch"
+ cvs-2013.patch openlog.patch 00-sslauth.patch 01-pidfile.patch 02-dumpfile.patch 03-signedness-warnings.patch 04-implicit-pointer-conversions.patch 05-unix98pty.patch 06-ipv6.patch 07-dual-family-transport.patch vtund-ipv6-client.conf vtund-ipv6-server.conf android-dev.patch tun-cat.c tun-cfg tun-cfg.conf README.tun-cfg)
+sha512sums=('5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54'
+'178f8cfc67f5de4b893bd0790f637c8e6988c4a317428330a7690d01ede0368920de8bcf8a1a08ad74300b772571d7e3d7a063cbfc685bf55dd4651f64d56558'
+ SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP SKIP)
install=vtun.install
prepare() {
@@ -20,7 +24,7 @@ prepare() {
HELPSTR=/usr/bin/tun-cfg ./tun-cfg --help > README.tun-cfg
cd "${srcdir}/${pkgname}-${_pkgver}"
# adding latest CVS 3_X2 branch changes and patches ported from Debian Jessie
- for p in cvs-2013.patch openlog.patch 00-sslauth.patch 01-pidfile.patch 02-dumpfile.patch 03-signedness-warnings.patch 04-implicit-pointer-conversions.patch 05-unix98pty.patch 06-ipv6.patch 07-dual-family-transport.patch; do
+ for p in cvs-2013.patch openlog.patch 00-sslauth.patch 01-pidfile.patch 02-dumpfile.patch 03-signedness-warnings.patch 04-implicit-pointer-conversions.patch 05-unix98pty.patch 06-ipv6.patch 07-dual-family-transport.patch 0001-fix-bison-compile-error.patch; do
patch -p1 -i "${srcdir}/$p" || exit 1
done
[[ "$CARCH" =~ ^arm ]] && patch -p1 -i "${srcdir}/android-dev.patch"
diff --git a/README.tun-cfg b/README.tun-cfg
index b142f575ecb9..9aca2c4db50f 100644
--- a/README.tun-cfg
+++ b/README.tun-cfg
@@ -1,4 +1,4 @@
-Tunnel-configurer version 1.6.1
+Tunnel-configurer version 1.7
Client-server IP tunnel configuration via the same IP tunnel.
-- vtund.conf --
@@ -62,6 +62,8 @@ TIMEOUT=10
LOCAL=server.vpn
# routes for sending to clients (example)
ROUTES='10.10.10.0/24 10.10.0.0/24'
+ # kill connection on server side if client still not configured
+ABORT=yes
-- Command-line description --
ifconfig wrapper:
@@ -97,6 +99,8 @@ noroutes|-r : server - Don't send any routes from config
: client - Don't get IPv4 routes from server
no6routes|-R : Don't get IPv6 routes from server (client only)
timeout|-t <sec> : default=10, 0=endless
+ abort|-k : Abort connection after timeout (server only)
+ keep|-K : ... or don't do it
nofork|-B | nobg | nobackground
NOTE:
diff --git a/tun-cfg b/tun-cfg
index c6fadf51f63d..d2433a41de8e 100755
--- a/tun-cfg
+++ b/tun-cfg
@@ -24,10 +24,11 @@ PORT=68
MTU=1500
TIMEOUT=10
CMD=tun-cat
+ABORT=
usage() {
[[ -n "$1" ]] && return 0
- echo "Tunnel-configurer version 1.6.1
+ echo "Tunnel-configurer version 1.7
Client-server IP tunnel configuration via the same IP tunnel.
-- vtund.conf --
@@ -91,6 +92,8 @@ TIMEOUT=10
LOCAL=server.vpn
# routes for sending to clients (example)
ROUTES='10.10.10.0/24 10.10.0.0/24'
+ # kill connection on server side if client still not configured
+ABORT=yes
-- Command-line description --
ifconfig wrapper:
@@ -126,6 +129,8 @@ noroutes|-r : server - Don't send any routes from config
: client - Don't get IPv4 routes from server
no6routes|-R : Don't get IPv6 routes from server (client only)
timeout|-t <sec> : default=10, 0=endless
+ abort|-k : Abort connection after timeout (server only)
+ keep|-K : ... or don't do it
nofork|-B | nobg | nobackground
NOTE:
@@ -271,6 +276,7 @@ main() {
sec_up SEC
if ((TIMEOUT!=0)) && ((SEC > START+TIMEOUT)) ; then
log "Time is out."
+ [[ -n "$PARENT" && -d "/proc/$PARENT" ]] && kill "$PARENT"
exit 6
fi
done
@@ -337,7 +343,7 @@ usage "$2"
ifc="$2"
shift 2
-unset ROLE PLUS PEER NO6ADDR NOADDR NOPEER FORCEMTU NOBG NOROUTES NO6ROUTES RPREF
+unset ROLE PLUS PEER NO6ADDR NOADDR NOPEER FORCEMTU NOBG NOROUTES NO6ROUTES RPREF PARENT
while (($#>0)) ; do
case "$1" in
-s|send)
@@ -377,6 +383,16 @@ while (($#>0)) ; do
shift 2
;;
+ -k|abort)
+ ABORT=1
+ shift
+ ;;
+
+ -K|keep)
+ ABORT=
+ shift
+ ;;
+
-B|nobg|nobackground|nofork)
NOBG=1
shift
@@ -459,6 +475,10 @@ if [[ -z "$NO6ADDR" ]] ; then
ip -6 route flush dev "$ifc"
fi
+if [[ "$ROLE" = send && -n "$ABORT" && "$ABORT" != 'no' ]] ; then
+ read PARENT g < <( ps h -o pid,cmd -C vtund | grep -E " vtund\[s\]: .+ tun $ifc[ ]*\$" )
+fi
+
if [[ -n "$NOBG" ]] ; then
main "$@"
else