From: charleswrayjr Date: Wed, 10 Sep 2025 03:01:53 +0000 (-0500) Subject: Adding more logging to disconnect method. X-Git-Url: https://git.phasecustomsoft.com/static/git-logo.png?a=commitdiff_plain;h=8a17eba85cf20521fa38effd8818c0d3b6b373f1;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 0e364c0..6945932 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -278,7 +278,7 @@ module.exports = { client.on('data', async (data) => { const response = data.toString(); logger.warn(response); - if (response.includes('SUCCESS:')) { + if (response.includes('SUCCESS:') || response.includes( 'CLIENT:ESTABLISHED' )) { if (duration && clientIp) { // Add iptables rule to block client IP for duration const conn = new Client();