docs/docs/otg/rany.md

36 lines
739 B
Markdown
Raw Normal View History

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/)
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="
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
EOF
2021-10-30 12:00:28 +01:00
exit 0
```