Tool that converts between Wireguard-secured IP packets and plain IP-over-UDP (i.e. FOU/GUE) datagrams. Someting like a boringtun-cli, but instead of a tun interface there is another UDP socket.
Example session
```
$ wg genkey | tee /dev/stderr | wg pubkey OGCvzGq9bbbiuiEXwHpdsK9QXEc13/2az0we5z7DCls= tGk/3hzFBUuG21EZ4iTN/ZChl4PYKtkfx31TDCz8wgI= $ wg genkey | tee /dev/stderr | wg pubkey GKLlQK+pdrdmX6M/1eujcZcjlBC8kvHPsQFznW6vuWI= IVbkRatA+KK2nE7GYuM+vPr/aWUK3VjmDQNAHaP21S8=
$ wg2gue -k GKLlQK+pdrdmX6M/1eujcZcjlBC8kvHPsQFznW6vuWI= -K tGk/3hzFBUuG21EZ4iTN/ZChl4PYKtkfx31TDCz8wgI= -b 127.0.0.1:1930 --gue-bind-ip-port 127.0.0.1:1931 --gue-peer-endpoint 127.0.0.1:1932
64 bytes from fd00::1: icmpseq=1 ttl=64 time=48.7 ms 64 bytes from fd00::1: icmpseq=2 ttl=64 time=0.960 ms ```
Download a pre-built executable from Github releases or install from source code with cargo install --path .
or cargo install wg2gue
.
wg2gue --help output
```
Usage: wg2gue [-k
Expose internet access without root using Wireguard
Options: -k, --private-key main private key of this Wireguard node, base64-encoded -f, --private-key-file main private key of this Wireguard node (content of a specified file), base64-encoded -K, --peer-key peer's public key -p, --wg-peer-endpoint address of the peer's UDP socket, where to send keepalives -a, --wg-keepalive-interval wireguard keepalive interval, in seconds -b, --wg-bind-ip-port where to bind UDP socket for Wireguard connection -g, --gue-bind-ip-port where to bind UDP socket for GUE/FOU -G, --gue-peer-endpoint send GUE/FOU datagrams to that socket address, not use remembered recvfrom address. -A, --gue-keepalive-interval send empty UDP datagrams to the GUE/FOU peer with this interval, in seconds --print-stats-interval print stats to stdout each N milliseconds --help display usage information
```