Browse Source

Hiding private key

pull/393/head
BrainStone 4 years ago
parent
commit
f5c2a14bb9
No known key found for this signature in database GPG Key ID: 66CCC234C2CEB306
  1. 2
      src/.eslintrc.json
  2. 4
      src/lib/WireGuard.js

2
src/.eslintrc.json

@ -8,4 +8,4 @@
"no-shadow": "off",
"max-len": "off"
}
}
}

4
src/lib/WireGuard.js

@ -227,7 +227,9 @@ 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`, {
log: 'echo ***hidden*** | wg pubkey',
});
const preSharedKey = await Util.exec('wg genpsk');
// Calculate next IP

Loading…
Cancel
Save