Update socket.js
This commit is contained in:
parent
1b5d759f36
commit
8ba0118acf
1 changed files with 1 additions and 8 deletions
|
@ -236,10 +236,8 @@ module.exports = function appSocket(socket) {
|
||||||
ssh.password = socket.request.session.userpassword;
|
ssh.password = socket.request.session.userpassword;
|
||||||
ssh.tryKeyboard = true;
|
ssh.tryKeyboard = true;
|
||||||
ssh.debug = debug('ssh2');
|
ssh.debug = debug('ssh2');
|
||||||
|
|
||||||
|
|
||||||
if ( config.ssh_proxy.ssh_proxy_enabled ) {
|
if ( config.ssh_proxy.ssh_proxy_enabled ) {
|
||||||
|
|
||||||
conn1.on('ready', () => {
|
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`);
|
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()
|
// Alternatively, you could use something like netcat or socat with exec()
|
||||||
|
@ -257,22 +255,17 @@ module.exports = function appSocket(socket) {
|
||||||
conn.connect(
|
conn.connect(
|
||||||
ssh
|
ssh
|
||||||
);
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
}).connect({
|
}).connect({
|
||||||
host: config.ssh_proxy.ssh_proxy_host,
|
host: config.ssh_proxy.ssh_proxy_host,
|
||||||
username: config.ssh_proxy.ssh_proxy_user,
|
username: config.ssh_proxy.ssh_proxy_user,
|
||||||
privateKey: readFileSync(config.ssh_proxy.ssh_proxy_privatekey),
|
privateKey: readFileSync(config.ssh_proxy.ssh_proxy_privatekey),
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
conn.connect(
|
conn.connect(
|
||||||
ssh
|
ssh
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
webssh2debug(
|
webssh2debug(
|
||||||
socket,
|
socket,
|
||||||
|
|
Loading…
Reference in a new issue