BrainStone
4 years ago
No known key found for this signature in database
GPG Key ID: 66CCC234C2CEB306
2 changed files with
4 additions and
2 deletions
-
src/.eslintrc.json
-
src/lib/WireGuard.js
|
|
|
@ -8,4 +8,4 @@ |
|
|
|
"no-shadow": "off", |
|
|
|
"max-len": "off" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -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
|
|
|
|
|