From 7222d0afb2cf85022f0e417e9f2e3eefdd10e3c6 Mon Sep 17 00:00:00 2001 From: alexn707 Date: Fri, 28 Feb 2025 09:22:19 +0300 Subject: [PATCH] Update WireGuard.js --- src/lib/WireGuard.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index 8ce325f7..e80b5715 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -26,6 +26,15 @@ const { WG_POST_DOWN, WG_ENABLE_EXPIRES_TIME, WG_ENABLE_ONE_TIME_LINKS, + JC, + JMIN, + JMAX, + S1, + S2, + H1, + H2, + H3, + H4, } = require('../config'); module.exports = class WireGuard { @@ -54,6 +63,15 @@ module.exports = class WireGuard { privateKey, publicKey, address, + jc: JC, + jmin: JMIN, + jmax: JMAX, + s1: S1, + s2: S2, + h1: H1, + h2: H2, + h3: H3, + h4: H4, }, clients: {}, }; @@ -109,6 +127,16 @@ PreUp = ${WG_PRE_UP} PostUp = ${WG_POST_UP} PreDown = ${WG_PRE_DOWN} PostDown = ${WG_POST_DOWN} +Jc = ${config.server.jc} +Jmin = ${config.server.jmin} +Jmax = ${config.server.jmax} +S1 = ${config.server.s1} +S2 = ${config.server.s2} +H1 = ${config.server.h1} +H2 = ${config.server.h2} +H3 = ${config.server.h3} +H4 = ${config.server.h4} +Jc = ${config.server.jc} `; for (const [clientId, client] of Object.entries(config.clients)) { @@ -218,6 +246,15 @@ PrivateKey = ${client.privateKey ? `${client.privateKey}` : 'REPLACE_ME'} Address = ${client.address}/24 ${WG_DEFAULT_DNS ? `DNS = ${WG_DEFAULT_DNS}\n` : ''}\ ${WG_MTU ? `MTU = ${WG_MTU}\n` : ''}\ +Jc = ${config.server.jc} +Jmin = ${config.server.jmin} +Jmax = ${config.server.jmax} +S1 = ${config.server.s1} +S2 = ${config.server.s2} +H1 = ${config.server.h1} +H2 = ${config.server.h2} +H3 = ${config.server.h3} +H4 = ${config.server.h4} [Peer] PublicKey = ${config.server.publicKey}