contrib: organize example scripts and add synergy
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
be4f3cd7c2
commit
4e04bee915
8 changed files with 43 additions and 0 deletions
3
contrib/synergy/README
Normal file
3
contrib/synergy/README
Normal file
|
@ -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.
|
18
contrib/synergy/synergy-client.sh
Executable file
18
contrib/synergy/synergy-client.sh
Executable file
|
@ -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
|
17
contrib/synergy/synergy-server.sh
Executable file
17
contrib/synergy/synergy-server.sh
Executable file
|
@ -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
|
5
contrib/systemd/README
Normal file
5
contrib/systemd/README
Normal file
|
@ -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.
|
Loading…
Reference in a new issue