From: charleswrayjr Date: Tue, 9 Sep 2025 21:19:16 +0000 (-0500) Subject: Adding more logging to disconnect method. X-Git-Url: https://git.phasecustomsoft.com/static/gitweb.js?a=commitdiff_plain;h=6fc3ec8527e607cc57ddf788cf3c2e40cf13e242;p=phs-api.git Adding more logging to disconnect method. --- diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index 664350f..3df35ae 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -270,13 +270,14 @@ module.exports = { const client = new net.Socket(); let connectionAttempted = false; client.on('connect', () => { - logger.info('Connected to OpenVPN management interface'); + logger.warn('Connected to OpenVPN management interface'); connectionAttempted = true; client.write(`client-kill ${clientName}\n`); }); client.on('data', async (data) => { const response = data.toString(); + logger.warn(response); if (response.includes('SUCCESS: client-kill command succeeded')) { if (duration && clientIp) { // Add iptables rule to block client IP for duration