donaldzou / WGDashboard

Simple dashboard for WireGuard VPN written in Python & Vue.js
https://donaldzou.github.io/WGDashboard-Documentation/
Apache License 2.0
1.63k stars 248 forks source link

API AddPeer autoconf #511

Open WoMec opened 15 hours ago

WoMec commented 15 hours ago

It would be great if the API could offer the same convenience as the GUI, including key generation and IP assignment, when adding a WireGuard peer.

I am using your project for IoT edge devices that are preconfigured with the same authentication script. Once powered up, these devices request a WireGuard configuration remotely.

DaanSelen commented 11 hours ago

To add further context, you mean that the IP field is optional and if not specified will be auto-filled with an available IP?

WoMec commented 11 hours ago

Exactly, and also the key pair. After creation, the configuration should be sent back to the requester. So, it might not be appropriate to call it "addPeer" but rather "createPeerConf." Perhaps another layer of security could be added using a preshared key together with requests api key.