wg-easy/src/config.js

17 lines
733 B
JavaScript
Raw Normal View History

2021-05-23 04:21:09 +08:00
'use strict';
2021-07-14 03:39:45 +08:00
const { release } = require('./package.json');
module.exports.RELEASE = release;
2021-05-23 18:02:56 +08:00
module.exports.PORT = process.env.PORT || 51821;
module.exports.PASSWORD = process.env.PASSWORD;
2021-05-23 04:21:09 +08:00
module.exports.WG_PATH = process.env.WG_PATH || '/etc/wireguard/';
2021-05-23 18:25:14 +08:00
module.exports.WG_HOST = process.env.WG_HOST;
2021-05-23 04:21:09 +08:00
module.exports.WG_PORT = process.env.WG_PORT || 51820;
2021-07-17 22:44:33 +08:00
module.exports.WG_PERSISTENT_KEEPALIVE = process.env.WG_PERSISTENT_KEEPALIVE || 0;
2021-05-23 05:29:01 +08:00
module.exports.WG_DEFAULT_ADDRESS = process.env.WG_DEFAULT_ADDRESS || '10.8.0.x';
module.exports.WG_DEFAULT_DNS = typeof process.env.WG_DEFAULT_DNS === 'string'
? 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';