diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-05 16:01:31 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-05 16:01:31 +0200 |
commit | f7ff6390bb898f343ef7b1590b6a9d56a296af8c (patch) | |
tree | aacdd65b3d7d97e2b8a1c1ae6aba93ff5c65ae42 /contrib/examples/synergy/synergy-client.sh | |
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/examples/synergy/synergy-client.sh')
-rwxr-xr-x | contrib/examples/synergy/synergy-client.sh | 18 |
1 files changed, 18 insertions, 0 deletions
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 |