Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 817 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 817 Bytes

plugin-wireguard

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