2021-10-29 17:15:06 +01:00
|
|
|
Rany's _on-the-go_
|
|
|
|
====================
|
|
|
|
|
|
|
|
## How to use it
|
|
|
|
|
|
|
|
All you need to do to get setup with Rany's On-the-go is the following (run it in your terminal):
|
|
|
|
|
|
|
|
```bash
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
privkey=$(wg genkey)
|
|
|
|
pubkey=$(printf %s "$privkey" | wg pubkey)
|
|
|
|
|
2021-10-30 12:00:28 +01:00
|
|
|
ret=$(curl -s -XPOST "-Fpubkey=$pubkey" http://rany1.duckdns.org:5000/)
|
2021-10-29 17:15:06 +01:00
|
|
|
|
|
|
|
myaddr=$(printf %s "$ret" | jq -rc .client_address)
|
|
|
|
serveraddr=$(printf %s "$ret" | jq -rc .server_address)
|
2021-10-30 12:00:28 +01:00
|
|
|
# serverpubkey=$(printf %s "$ret" | jq -rc .server_pubkey)
|
2021-10-30 11:56:14 +01:00
|
|
|
serverpubkey="CPOuiTlyE/+C/+3iZOv7XrjPEpwl0MFlbTN4nUrQkRo="
|
2021-10-29 17:15:06 +01:00
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
[Interface]
|
|
|
|
PrivateKey = $privkey
|
|
|
|
Address = $myaddr/8
|
|
|
|
MTU = 1280
|
|
|
|
|
|
|
|
[Peer]
|
|
|
|
PublicKey = $serverpubkey
|
|
|
|
AllowedIPs = fd00::/8
|
|
|
|
Endpoint = $serveraddr
|
2021-10-30 11:54:28 +01:00
|
|
|
PersistentKeepalive = 25
|
2021-10-29 17:15:06 +01:00
|
|
|
EOF
|
2021-10-30 12:00:28 +01:00
|
|
|
|
|
|
|
exit 0
|
2021-10-29 17:15:06 +01:00
|
|
|
```
|