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