From 8ba0118acfdd2098e280b29d3e8bd1f30fd13d6e Mon Sep 17 00:00:00 2001 From: Karoly Czovek <30385976+karolyczovek@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:42:49 +0200 Subject: [PATCH] Update socket.js --- app/server/socket.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/server/socket.js b/app/server/socket.js index 07208a4..b1b4e88 100644 --- a/app/server/socket.js +++ b/app/server/socket.js @@ -236,10 +236,8 @@ module.exports = function appSocket(socket) { ssh.password = socket.request.session.userpassword; ssh.tryKeyboard = true; ssh.debug = debug('ssh2'); - - + if ( config.ssh_proxy.ssh_proxy_enabled ) { - conn1.on('ready', () => { console.log(`vpn.cw :: connection ready over ${config.ssh_proxy.ssh_proxy_host} with user ${config.ssh_proxy.ssh_proxy_user} using ssh key auth`); // Alternatively, you could use something like netcat or socat with exec() @@ -257,22 +255,17 @@ module.exports = function appSocket(socket) { conn.connect( ssh ); - }); }).connect({ host: config.ssh_proxy.ssh_proxy_host, username: config.ssh_proxy.ssh_proxy_user, privateKey: readFileSync(config.ssh_proxy.ssh_proxy_privatekey), }); - } else { - conn.connect( ssh ); - } - } else { webssh2debug( socket,