From: charleswrayjr Date: Mon, 8 Sep 2025 16:03:57 +0000 (-0500) Subject: Testing vpn paths. X-Git-Url: https://git.phasecustomsoft.com/static/git-logo.png?a=commitdiff_plain;h=34e0a36bd637d6c7b82f83fb4dc42de0a231049d;p=phs-api.git Testing vpn paths. --- diff --git a/src/controllers/vpn.controller.js b/src/controllers/vpn.controller.js index 05a1fb9..0d5d9c2 100644 --- a/src/controllers/vpn.controller.js +++ b/src/controllers/vpn.controller.js @@ -94,7 +94,7 @@ module.exports = { const C = [...lines].slice(sIndex +1, mIndex).filter( line => line.trim() ); const R = [...lines].slice(mIndex +2, eIndex).filter( line => line.trim() ); console.log('clients: ', C, ' routes: ', R ); - const clients = C.slice( sIndex + 1, mIndex ).map( line => { + const clients = C.map( line => { const parts = line.split( ',' ); const vLine = R.find( l => l.includes( parts[0] ) && l !== line ); return { name:parts[0], ip:parts[1], virtual_ip:vLine.split( ',' )[0], connectedSince:parts[4] };