]> PHS Git Server - phs-api.git/commitdiff
Adding more logging to disconnect method.
authorcharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 21:19:16 +0000 (16:19 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Tue, 9 Sep 2025 21:19:16 +0000 (16:19 -0500)
src/controllers/vpn.controller.js

index 664350f378e4fc35585a45ec632f1844a031c3ee..3df35aed7b0037e9400489980a3b42e23a13e373 100644 (file)
@@ -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