]> Cypherpunks.ru repositories - govpn.git/commitdiff
Merge branch 'develop' 5.6
authorSergey Matveev <stargrave@stargrave.org>
Fri, 12 Feb 2016 08:04:52 +0000 (11:04 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Fri, 12 Feb 2016 08:04:52 +0000 (11:04 +0300)
VERSION
doc/Makefile
doc/download.texi
doc/example.texi
doc/news.ru.texi
doc/news.texi
src/cypherpunks.ru/govpn/peer.go
utils/addroute.sh [new file with mode: 0755]

diff --git a/VERSION b/VERSION
index 9ad974f6109e4bf8a9c47b6d1870e2b4990d9841..2df33d76977064e686bccc1b213c1c9186354aba 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.5
+5.6
index d51a84341651772baaebf27b094a6a2ae76a9569..1d1032d4704a7707cdd1089183866c2492ed5d28 100644 (file)
@@ -6,7 +6,7 @@ handshake.utxt: handshake.txt
        plantuml -tutxt handshake.txt
 
 govpn.info: *.texi handshake.utxt
-       $(MAKEINFO) index.texi
+       $(MAKEINFO) -o govpn.info index.texi
 
 govpn.html: *.texi handshake.utxt
        rm -f govpn.html/*.html
index a8710f083df2b46630020c5c46508c9d6243882d..7828870d95cb7c7eadbdcd63359d327b1fd571e0 100644 (file)
@@ -6,6 +6,10 @@ You can obtain releases source code prepared tarballs from the links below:
 @multitable {XXXXX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
 @headitem Version @tab Size @tab Tarball @tab SHA256 checksum
 
+@item @ref{Release 5.5, 5.5} @tab 310 KiB
+@tab @url{download/govpn-5.5.tar.xz, link} @url{download/govpn-5.5.tar.xz.sig, sign}
+@tab @code{2f32e02c34a13eae538be7b44c11e16a8e68c43afc8e4a3071172f9c52b861d8}
+
 @item @ref{Release 5.4, 5.4} @tab 310 KiB
 @tab @url{download/govpn-5.4.tar.xz, link} @url{download/govpn-5.4.tar.xz.sig, sign}
 @tab @code{a1a001d9ef899ff6b61872eb7d2425a09eb0161574f50c8da6e4b14beb9b0ff6}
index 619e9c620aa406e2c6c5fd71b3410b19bcf5dff3..5f28a7fd861050be3de3d33926bb0c544502723a 100644 (file)
@@ -64,7 +64,8 @@ client% ip addr add 192.168.0.2/24 dev wlan0
 client% ip tuntap add dev tap10 mode tap
 client% ip addr add 172.16.0.2/24 dev tap10
 client% ip link set up dev tap10
-client% ip route add default via 172.16.0.1
+client% ip route add 0/1 via 172.16.0.1
+client% ip route add 128/1 via 172.16.0.1
 @end verbatim
 
 @strong{Run client daemon itself}:
index 5e8efbed94145962f4daf1522abc3959d74cc87c..15219a64de96e194608fa62161c61e53911bf011 100644 (file)
@@ -1,6 +1,15 @@
 @node Новости
 @section Новости
 
+@node Релиз 5.6
+@subsection Релиз 5.6
+@itemize
+@item Добавлен up/down скрипт-пример для подмены маршрута по-умолчанию
+(спасибо Zhuoyun Wei).
+@item Исправлена ошибка при генерировании документации: @file{.info}
+файл не устанавливался.
+@end itemize
+
 @node Релиз 5.5
 @subsection Релиз 5.5
 @itemize
index a33f4150c8a4475e8d6d12b85132ff28460c5dd7..99edbe60397bbc862bb75dce04f2668819de920f 100644 (file)
@@ -3,6 +3,14 @@
 
 See also this page @ref{Новости, on russian}.
 
+@node Release 5.6
+@section Release 5.6
+@itemize
+@item Added up/down example script for replacing default route (thanks
+to Zhuoyun Wei).
+@item Fixed documentation bug: @file{.info} was not installing.
+@end itemize
+
 @node Release 5.5
 @section Release 5.5
 @itemize
index a9c0aaae8dbe386dad397e2df97aaea3a7ee9d03..5160bd4cc6b2f7b172d3441b90762faf73f71ee1 100644 (file)
@@ -79,7 +79,7 @@ type Peer struct {
        // Basic
        Addr string
        Id   *PeerId
-       Conn io.Writer
+       Conn io.Writer `json:"-"`
 
        // Traffic behaviour
        NoiseEnable bool
diff --git a/utils/addroute.sh b/utils/addroute.sh
new file mode 100755 (executable)
index 0000000..a8d85cd
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/sh -x
+
+# A simple script handling default routing for GoVPN,
+# inspired by vpnc-script, but much simpler.
+
+# 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
+# - 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
+}
+
+
+tear_down_dev() {
+  ip tuntap del dev $TAPDEV 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
+}
+
+
+do_disconnect() {
+  ip route del $VPNGATEWAY
+}
+
+
+case $reason in
+  pre-init)
+    set_up_dev
+    ;;
+  connect)
+    do_connect
+    ;;
+  disconnect)
+    do_disconnect
+    ;;
+esac