From: Sergey Matveev Date: Sun, 13 Mar 2016 08:55:54 +0000 (+0300) Subject: Merge branch 'develop' X-Git-Tag: 5.7^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=commitdiff_plain;h=cee89cfdfbc6b2b429d56f0b420bc5b981e475b8;hp=124b8310c8fa341a8309ec71a295a7a0fb057950 Merge branch 'develop' --- diff --git a/VERSION b/VERSION index 2df33d7..760606e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.6 +5.7 diff --git a/common.mk b/common.mk index 0730f59..bd2f3a4 100644 --- a/common.mk +++ b/common.mk @@ -19,7 +19,7 @@ govpn-verifier: GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" cypherpunks.ru/govpn/cmd/govpn-verifier bench: - GOPATH=$(GOPATH) go test -bench . cypherpunks.ru/govpn/... + GOPATH=$(GOPATH) go test -benchmem -bench . cypherpunks.ru/govpn/... clean: rm -f govpn-client govpn-server govpn-verifier diff --git a/doc/client.texi b/doc/client.texi index 5b0ae2b..b6d8aab 100644 --- a/doc/client.texi +++ b/doc/client.texi @@ -51,8 +51,9 @@ Set @ref{CPR} in KiB/sec. Enable @ref{Encless, encryptionless mode}. @item -up -Optional path to script that will be executed after connection is -established. Interface name will be given to it as a first argument. +Optional path to @ref{Scripts, script} that will be executed after +connection is established. Interface name will be given to it as a first +argument. @item -down Same as @option{-up} above, but it is executed when connection is lost, @@ -66,8 +67,8 @@ solicitation: @verbatim client% cat > up.sh <.` +) diff --git a/src/github.com/go-yaml/yaml b/src/github.com/go-yaml/yaml index f7716cb..a83829b 160000 --- a/src/github.com/go-yaml/yaml +++ b/src/github.com/go-yaml/yaml @@ -1 +1 @@ -Subproject commit f7716cbe52baa25d2e9b0d0da546fcf909fc16b4 +Subproject commit a83829b6f1293c91addabc89d0571c246397bbf4 diff --git a/src/github.com/magical/argon2 b/src/github.com/magical/argon2 index 82d59eb..190e3cf 160000 --- a/src/github.com/magical/argon2 +++ b/src/github.com/magical/argon2 @@ -1 +1 @@ -Subproject commit 82d59eb7dab9a6268371a8c6de2100a2c7357bc6 +Subproject commit 190e3cf208e185668db6aa048e4985b7b7b4d890 diff --git a/utils/addroute.sh b/utils/addroute.sh index a8d85cd..e0ad70b 100755 --- a/utils/addroute.sh +++ b/utils/addroute.sh @@ -6,34 +6,34 @@ # List of parameters passed through environment # - reason -- why this script is called: # pre-init, connect, disconnect -# - VPNGATEWAY -- public address of vpn gateway -# - TAPDEV -- tap device +# - GOVPN_REMOTE -- public address of VPN gateway +# - GOVPN_IFACE -- tap device # - INTERNAL_IP4_ADDRESS -- e.g. 172.0.0.2/24 # - INTERNAL_IP4_GATEWAY -- e.g. 172.0.0.1 set_up_dev() { - ip tuntap add dev $TAPDEV mode tap + ip tuntap add dev $GOVPN_IFACE mode tap } tear_down_dev() { - ip tuntap del dev $TAPDEV mode tap + ip tuntap del dev $GOVPN_IFACE mode tap } do_connect() { local OLDGW=$(ip route show 0/0 | sed 's/^default//') - ip link set dev $TAPDEV up - ip addr add $INTERNAL_IP4_ADDRESS dev $TAPDEV - ip route add $VPNGATEWAY $OLDGW - ip route add 0/1 via $INTERNAL_IP4_GATEWAY dev $TAPDEV - ip route add 128/1 via $INTERNAL_IP4_GATEWAY dev $TAPDEV + ip link set dev $GOVPN_IFACE up + ip addr add $INTERNAL_IP4_ADDRESS dev $GOVPN_IFACE + ip route add $GOVPN_REMOTE $OLDGW + ip route add 0/1 via $INTERNAL_IP4_GATEWAY dev $GOVPN_IFACE + ip route add 128/1 via $INTERNAL_IP4_GATEWAY dev $GOVPN_IFACE } do_disconnect() { - ip route del $VPNGATEWAY + ip route del $GOVPN_REMOTE }