From 8616bdb25070c7a03ce0c34efa1b9bcccc7fe06e Mon Sep 17 00:00:00 2001 From: jdeath <17914369+jdeath@users.noreply.github.com> Date: Wed, 22 Dec 2021 11:06:04 -0500 Subject: [PATCH] Update WireGuard.js Fix to allow use of WG_PATH --- src/lib/WireGuard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index 271a2475..a1661a51 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -54,8 +54,8 @@ module.exports = class WireGuard { } await this.__saveConfig(config); - await Util.exec('wg-quick down wg0').catch(() => { }); - await Util.exec('wg-quick up wg0'); + await Util.exec('wg-quick down '+ WG_PATH + '/wg0').catch(() => { }); + await Util.exec('wg-quick up '+ WG_PATH + '/wg0'); await Util.exec(`iptables -t nat -A POSTROUTING -s ${WG_DEFAULT_ADDRESS.replace('x', '0')}/24 -o eth0 -j MASQUERADE`); await Util.exec('iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT'); await Util.exec('iptables -A FORWARD -i wg0 -j ACCEPT');