]> PHS Git Server - phs-api.git/commitdiff
Adding more logging to disconnect method.
authorcharleswrayjr <charleswrayjr@gmail.com>
Wed, 10 Sep 2025 03:14:20 +0000 (22:14 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Wed, 10 Sep 2025 03:14:20 +0000 (22:14 -0500)
src/controllers/vpn.controller.js

index 694593226303616efc9d59f672d30453f02a596d..8b4f888a871ccfd6d618b979585a23e1bdaeb0a2 100644 (file)
@@ -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();