diff options
author | 2016-07-05 16:01:31 +0200 | |
---|---|---|
committer | 2016-07-05 16:01:31 +0200 | |
commit | f7ff6390bb898f343ef7b1590b6a9d56a296af8c (patch) | |
tree | aacdd65b3d7d97e2b8a1c1ae6aba93ff5c65ae42 /contrib | |
parent | receive: protect against impossible conditions (diff) | |
download | wireguard-monolithic-historical-f7ff6390bb898f343ef7b1590b6a9d56a296af8c.tar.xz wireguard-monolithic-historical-f7ff6390bb898f343ef7b1590b6a9d56a296af8c.zip |
contrib: organize example scripts and add synergy
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/examples/ncat-client-server/README (renamed from contrib/client-server-example/README) | 0 | ||||
-rwxr-xr-x | contrib/examples/ncat-client-server/client.sh (renamed from contrib/client-server-example/client.sh) | 0 | ||||
-rwxr-xr-x | contrib/examples/ncat-client-server/server.sh (renamed from contrib/client-server-example/server.sh) | 0 | ||||
-rw-r--r-- | contrib/examples/synergy/README | 3 | ||||
-rwxr-xr-x | contrib/examples/synergy/synergy-client.sh | 18 | ||||
-rwxr-xr-x | contrib/examples/synergy/synergy-server.sh | 17 | ||||
-rw-r--r-- | contrib/examples/systemd/README | 5 | ||||
-rw-r--r-- | contrib/examples/systemd/wgserver.service (renamed from contrib/wgserver.service) | 0 |
8 files changed, 43 insertions, 0 deletions
diff --git a/contrib/client-server-example/README b/contrib/examples/ncat-client-server/README index fd3088a..fd3088a 100644 --- a/contrib/client-server-example/README +++ b/contrib/examples/ncat-client-server/README diff --git a/contrib/client-server-example/client.sh b/contrib/examples/ncat-client-server/client.sh index fbae46a..fbae46a 100755 --- a/contrib/client-server-example/client.sh +++ b/contrib/examples/ncat-client-server/client.sh diff --git a/contrib/client-server-example/server.sh b/contrib/examples/ncat-client-server/server.sh index e37861f..e37861f 100755 --- a/contrib/client-server-example/server.sh +++ b/contrib/examples/ncat-client-server/server.sh diff --git a/contrib/examples/synergy/README b/contrib/examples/synergy/README new file mode 100644 index 0000000..b75fb77 --- /dev/null +++ b/contrib/examples/synergy/README @@ -0,0 +1,3 @@ +These scripts should be modified according to your precise setup. +They provide a very simple way of tunneling synergy inside of a +WireGuard tunnel, to protect your data in transit. diff --git a/contrib/examples/synergy/synergy-client.sh b/contrib/examples/synergy/synergy-client.sh new file mode 100755 index 0000000..56cfdb2 --- /dev/null +++ b/contrib/examples/synergy/synergy-client.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -ex +if [[ $UID == 0 ]]; then + ip link del dev synergy || true + ip link add dev synergy type wireguard + ip address add 10.193.125.39/32 peer 10.193.125.38/32 dev synergy + wg set synergy \ + listen-port 29184 \ + private-key <(echo oNcsXA5Ma56q9xHmvvKuzLfwXYy7Uqy+bTmmXg/XtVs=) \ + peer m321UMZXoJ6qw8Jli2spbAVBc2MdOzV/EHDKfZQy0g0= \ + allowed-ips 10.193.125.38/32 \ + endpoint 10.10.10.100:29184 + ip link set up dev synergy +else + sudo "$(readlink -f "$0")" + killall synergyc || true + synergyc 10.193.125.38:38382 +fi diff --git a/contrib/examples/synergy/synergy-server.sh b/contrib/examples/synergy/synergy-server.sh new file mode 100755 index 0000000..6bef423 --- /dev/null +++ b/contrib/examples/synergy/synergy-server.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -ex +if [[ $UID == 0 ]]; then + ip link del dev synergy || true + ip link add dev synergy type wireguard + ip address add 10.193.125.38/32 peer 10.193.125.39/32 dev synergy + wg set synergy \ + listen-port 29184 \ + private-key <(echo 2InSrlZA5eQfI/MvnvPieqNTBo9cd+udc3SOO9yFpXo=) \ + peer CBnoidQLjlbRsrqrI56WQbANWwkll41w/rVUIW9zISI= \ + allowed-ips 10.193.125.39/32 + ip link set up dev synergy +else + sudo "$(readlink -f "$0")" + killall synergys || true + synergys -a 10.193.125.38:38382 +fi diff --git a/contrib/examples/systemd/README b/contrib/examples/systemd/README new file mode 100644 index 0000000..1ef51aa --- /dev/null +++ b/contrib/examples/systemd/README @@ -0,0 +1,5 @@ +Until WireGuard receives full integration to the various network +management utilities, there are a number of ways of setting up +a WireGuard tunnel at boot time. This systemd unit file is one +such way of doing things. Probably it should be tweaked before +using. diff --git a/contrib/wgserver.service b/contrib/examples/systemd/wgserver.service index dfce1e9..dfce1e9 100644 --- a/contrib/wgserver.service +++ b/contrib/examples/systemd/wgserver.service |