Open blogwy opened 3 years ago
After I run closeTunnel, the tunnel website can still be accessed. Then it took 2 minutes for the tunnel to be completely closed
const SSH2Promise = require('ssh2-promise')
const sshconfig = { host: 'xxxxx', username: 'xxxx', password: 'xxxx', port: 'xxxx' }
const tunnelConfig = { name: 'hahaha', remoteAddr: 'localhost', remotePort: '80' }
var ssh = new SSH2Promise(sshconfig);
ssh.addTunnel(tunnelConfig).then((tunnel) => { console.log(tunnel.localPort); });
ssh.closeTunnel('hahaha') .then(res => { console.log('24') console.log(res) }) .catch(err => { console.log('28') console.log(err) })
i have the same issue. closeTunnel just hangs :/
After I run closeTunnel, the tunnel website can still be accessed. Then it took 2 minutes for the tunnel to be completely closed
const SSH2Promise = require('ssh2-promise')
const sshconfig = { host: 'xxxxx', username: 'xxxx', password: 'xxxx', port: 'xxxx' }
const tunnelConfig = { name: 'hahaha', remoteAddr: 'localhost', remotePort: '80' }
var ssh = new SSH2Promise(sshconfig);
ssh.addTunnel(tunnelConfig).then((tunnel) => { console.log(tunnel.localPort); });
ssh.closeTunnel('hahaha') .then(res => { console.log('24') console.log(res) }) .catch(err => { console.log('28') console.log(err) })