This commit is contained in:
Emile Nijssen 2021-11-12 21:27:58 +00:00
parent c19cb72b6d
commit e843593b17
4 changed files with 7 additions and 3 deletions

4
package-lock.json generated Normal file
View File

@ -0,0 +1,4 @@
{
"version": "1.0.0",
"lockfileVersion": 1
}

View File

@ -19,7 +19,7 @@ module.exports = class Util {
static promisify(fn) {
// eslint-disable-next-line func-names
return function (req, res) {
return function(req, res) {
Promise.resolve().then(async () => fn(req, res))
.then(result => {
if (res.headersSent) return;

View File

@ -38,7 +38,7 @@ module.exports = class WireGuard {
} catch (err) {
const privateKey = await Util.exec('wg genkey');
const publicKey = await Util.exec(`echo ${privateKey} | wg pubkey`, {
log: `echo ***hidden*** | wg pubkey`
log: 'echo ***hidden*** | wg pubkey',
});
const address = WG_DEFAULT_ADDRESS.replace('x', '1');