diff --git a/src/vpnHandler/vpn.js b/src/vpnHandler/vpn.js index 347f162..3c8efc3 100644 --- a/src/vpnHandler/vpn.js +++ b/src/vpnHandler/vpn.js @@ -51,7 +51,10 @@ AllowedIPs = 10.0.0.${ipLast}/32 fs.appendFileSync(WG_CONF, peerEntry); // apply config instantly - execSync(`wg syncconf wg0 <(wg-quick strip wg0)`, { shell: "/bin/bash" }); + // execSync(`wg syncconf wg0 <(wg-quick strip wg0)`, { shell: "/bin/bash" }); + execSync(`wg-quick strip wg0 > /tmp/wg0.tmp`); + execSync(`wg syncconf wg0 /tmp/wg0.tmp`); + } function generateClientConf(privateKey, ip) {