wireguardのpeerをAdd,Delete,Getするアプリケーション
go install github.com/doornoc/dsbd-wg/cmd/backend@latest
POST /api/v1/peer
{
"public_key": "3wom4zptIT7Mc1UgEs5rmNbKwyYa/AXSlDoH/XitEFc=",
"endpoint": "x.x.x.x:xxxx",
"allowed_ips": [
"x.x.x.x/32",
]
}
curl -X POST -H "Content-Type: application/json" -d '{}'
Delete /api/v1/peer
{
"public_key": "3wom4zptIT7Mc1UgEs5rmNbKwyYa/AXSlDoH/XitEFc="
}
curl -X DELETE -H "Content-Type: application/json" -d '{}'
GET /api/v1/peer