forked from mirrors/amnezia-wg-easy
add WG_ALLOWED_IPS; https://github.com/WeeJeWel/wg-easy/issues/19
This commit is contained in:
parent
ffaf67a08a
commit
8919451430
4 changed files with 5 additions and 1 deletions
|
@ -7,3 +7,4 @@ module.exports.WG_HOST = process.env.WG_HOST;
|
|||
module.exports.WG_PORT = process.env.WG_PORT || 51820;
|
||||
module.exports.WG_DEFAULT_ADDRESS = process.env.WG_DEFAULT_ADDRESS || '10.8.0.x';
|
||||
module.exports.WG_DEFAULT_DNS = process.env.WG_DEFAULT_DNS || '1.1.1.1';
|
||||
module.exports.WG_ALLOWED_IPS = process.env.WG_ALLOWED_IPS || '0.0.0.0/0, ::/0';
|
||||
|
|
|
@ -16,6 +16,7 @@ const {
|
|||
WG_PORT,
|
||||
WG_DEFAULT_DNS,
|
||||
WG_DEFAULT_ADDRESS,
|
||||
WG_ALLOWED_IPS,
|
||||
} = require('../config');
|
||||
|
||||
module.exports = class WireGuard {
|
||||
|
@ -178,7 +179,7 @@ DNS = ${WG_DEFAULT_DNS}
|
|||
[Peer]
|
||||
PublicKey = ${config.server.publicKey}
|
||||
PresharedKey = ${client.preSharedKey}
|
||||
AllowedIPs = 0.0.0.0/0, ::/0
|
||||
AllowedIPs = ${WG_ALLOWED_IPS}
|
||||
Endpoint = ${WG_HOST}:${WG_PORT}`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue