config: Add support for custom client port configuration (#1090)
Thank you @adriy-be! This will enable homeassistant support
This commit is contained in:
commit
de22768079
|
@ -15,6 +15,7 @@ services:
|
||||||
# - PASSWORD=foobar123
|
# - PASSWORD=foobar123
|
||||||
# - PORT=51821
|
# - PORT=51821
|
||||||
# - WG_PORT=51820
|
# - WG_PORT=51820
|
||||||
|
# - WG_CONFIG_PORT=92820
|
||||||
# - WG_DEFAULT_ADDRESS=10.8.0.x
|
# - WG_DEFAULT_ADDRESS=10.8.0.x
|
||||||
# - WG_DEFAULT_DNS=1.1.1.1
|
# - WG_DEFAULT_DNS=1.1.1.1
|
||||||
# - WG_MTU=1420
|
# - WG_MTU=1420
|
||||||
|
|
|
@ -10,6 +10,7 @@ module.exports.WG_PATH = process.env.WG_PATH || '/etc/wireguard/';
|
||||||
module.exports.WG_DEVICE = process.env.WG_DEVICE || 'eth0';
|
module.exports.WG_DEVICE = process.env.WG_DEVICE || 'eth0';
|
||||||
module.exports.WG_HOST = process.env.WG_HOST;
|
module.exports.WG_HOST = process.env.WG_HOST;
|
||||||
module.exports.WG_PORT = process.env.WG_PORT || '51820';
|
module.exports.WG_PORT = process.env.WG_PORT || '51820';
|
||||||
|
module.exports.WG_CONFIG_PORT = process.env.WG_CONFIG_PORT || process.env.WG_PORT || '51820';
|
||||||
module.exports.WG_MTU = process.env.WG_MTU || null;
|
module.exports.WG_MTU = process.env.WG_MTU || null;
|
||||||
module.exports.WG_PERSISTENT_KEEPALIVE = process.env.WG_PERSISTENT_KEEPALIVE || '0';
|
module.exports.WG_PERSISTENT_KEEPALIVE = process.env.WG_PERSISTENT_KEEPALIVE || '0';
|
||||||
module.exports.WG_DEFAULT_ADDRESS = process.env.WG_DEFAULT_ADDRESS || '10.8.0.x';
|
module.exports.WG_DEFAULT_ADDRESS = process.env.WG_DEFAULT_ADDRESS || '10.8.0.x';
|
||||||
|
|
|
@ -13,6 +13,7 @@ const {
|
||||||
WG_PATH,
|
WG_PATH,
|
||||||
WG_HOST,
|
WG_HOST,
|
||||||
WG_PORT,
|
WG_PORT,
|
||||||
|
WG_CONFIG_PORT,
|
||||||
WG_MTU,
|
WG_MTU,
|
||||||
WG_DEFAULT_DNS,
|
WG_DEFAULT_DNS,
|
||||||
WG_DEFAULT_ADDRESS,
|
WG_DEFAULT_ADDRESS,
|
||||||
|
@ -207,7 +208,7 @@ PublicKey = ${config.server.publicKey}
|
||||||
${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
|
${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
|
||||||
}AllowedIPs = ${WG_ALLOWED_IPS}
|
}AllowedIPs = ${WG_ALLOWED_IPS}
|
||||||
PersistentKeepalive = ${WG_PERSISTENT_KEEPALIVE}
|
PersistentKeepalive = ${WG_PERSISTENT_KEEPALIVE}
|
||||||
Endpoint = ${WG_HOST}:${WG_PORT}`;
|
Endpoint = ${WG_HOST}:${WG_CONFIG_PORT}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getClientQRCodeSVG({ clientId }) {
|
async getClientQRCodeSVG({ clientId }) {
|
||||||
|
|
Loading…
Reference in New Issue