Browse Source

Fix WG_DEFAULT_ADDRESS if not set (#951)

pull/956/head
Philip H 1 year ago
committed by GitHub
parent
commit
2dafeae54d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/config.js

2
src/config.js

@ -14,7 +14,7 @@ module.exports.WG_HOST = process.env.WG_HOST;
module.exports.WG_PORT = process.env.WG_PORT || '51820';
module.exports.WG_MTU = process.env.WG_MTU || null;
module.exports.WG_PERSISTENT_KEEPALIVE = process.env.WG_PERSISTENT_KEEPALIVE || '0';
module.exports.WG_DEFAULT_ADDRESS = process.env.WG_DEFAULT_ADDRESS.replace('x', '0') || '10.8.0.0';
module.exports.WG_DEFAULT_ADDRESS = (process.env.WG_DEFAULT_ADDRESS && process.env.WG_DEFAULT_ADDRESS.replace('x', '0')) || '10.8.0.0';
module.exports.WG_DEFAULT_ADDRESS_RANGE = process.env.WG_DEFAULT_ADDRESS_RANGE || '24';
module.exports.WG_DEFAULT_DNS = typeof process.env.WG_DEFAULT_DNS === 'string'
? process.env.WG_DEFAULT_DNS

Loading…
Cancel
Save