diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index a0c2b217..935f7553 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -252,7 +252,7 @@ Endpoint = ${WG_HOST}:${WG_PORT}`; const config = await this.getConfig(); const privateKey = await Util.exec('wg genkey'); - const publicKey = await Util.exec(`echo ${privateKey} | wg pubkey`); + const publicKey = await Util.exec(`echo ${privateKey} | wg pubkey`, privateKey); const preSharedKey = await Util.exec('wg genpsk'); // Calculate next IP