this will be integrated with this conatiner: https://github.com/spr-networks/super/tree/main/wireguard
testing the setup:
docker build -t plugin-wireguard --build-arg TARGETARCH=amd64 .
docker run -v $PWD/../state/wireguard:/state/api -v $PWD/../configs:/configs plugin-wireguard
verify plugin is working:
export SOCK=$PWD/../state/wireguard/wireguard_plugin
sudo chmod a+w $SOCK
curl -s --unix-socket $SOCK http://localhost/peers
if no PublicKey is specifed one will be generated:
curl -s --unix-socket $SOCK http://localhost/peer -X PUT --data "{}"
or specify PublicKey:
KEY=$(wg genkey)
PUBKEY=$(echo $KEY | wg pubkey)
curl -s --unix-socket $SOCK http://localhost/peer -X PUT --data "{\"PublicKey\": \"${PUBKEY}\"}"
use the ui for .conf and qrcode