From 324ba6d525cb5ffcbba293463a1a20b0846da48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Tue, 12 Feb 2019 11:10:55 +0000 Subject: [PATCH] Update README.md and glorytun-setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- README.md | 15 ++++++++------- systemd/glorytun-setup | 4 +++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 02ae12c..6eb142a 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,12 @@ The key features of Glorytun come directly from mud: This is the main feature of Glorytun that allows to build an SD-WAN like service. This allows a TCP connection to explore and exploit multiple links without being disconnected. + * **Traffic shaping** + + Shaping is very important in network, it allows to keep a low latency without sacrificing the bandwidth. + It also helps the multipath scheduler to make better decisions. + Currently it must be configured by hand, but soon Glorytun will do it for you. + * **Path MTU discovery without ICMP** Bad MTU configuration is a very common problem in the world of VPN. @@ -39,11 +45,6 @@ The key features of Glorytun come directly from mud: It doesn't rely on ICMP Next-hop MTU to avoid black holes. In asymmetric situations the minimum MTU is selected. - * **Dynamic and automatic traffic shaping (work in progress)** - - Shaping is very important in network, it allows to keep a low latency without sacrificing the bandwidth. - As it is hard to setup, especially in the case of 4G, Glorytun will do it for you. - ## Build and Install We recommend the use of [meson](http://mesonbuild.com) for building instead of @@ -110,9 +111,9 @@ Then simply call: # glorytun bind 0.0.0.0 to SERVER_IP keyfile my_secret_key & # ifconfig tun0 10.0.1.2 pointopoint 10.0.1.1 up -Here the tricky part... You need to specify your paths or glorytun will not send anything, it's easy: +Now you have to setup your path, let's say you have an ADSL link that can do 1Mbit upload and 20Mbit download then call: - # glorytun path LOCAL_IPADDR up + # glorytun path up LOCAL_IPADDR rate tx 125000 rx 2500000 Again, to check if your path is working, you can watch its status with `glorytun path`. You should now be able to ping your server with `ping 10.0.1.1`. diff --git a/systemd/glorytun-setup b/systemd/glorytun-setup index abfdaa9..7e69027 100755 --- a/systemd/glorytun-setup +++ b/systemd/glorytun-setup @@ -59,7 +59,9 @@ TABLE=200 # keep the current route to HOST SRC=$(ip route get "$HOST" | awk '/src/{getline;print $0}' RS=' ') ip rule add from "$SRC" table main pref "$((PREF-1))" || true -glorytun path up "$SRC" dev "$DEV" + +# limit to 100Mbit by default +glorytun path up "$SRC" dev "$DEV" rate rx 12500000 tx 12500000 # forward everything else to the tunnel ip rule add from all table "$TABLE" pref "$PREF" || true