feature: Add support for getting inbound connection.

Also fixes any bugs I found.
This commit is contained in:
greysoh 2024-05-07 18:35:04 -04:00
parent b99d6a89dc
commit a9fcdea037
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
8 changed files with 146 additions and 17 deletions

View file

@ -179,7 +179,7 @@ export class SSHBackendProvider implements BackendBaseClass {
srcConn.write(chunk);
});
destConn.addListener("close", () => {
destConn.addListener("end", () => {
this.clients.splice(this.clients.indexOf(client), 1);
srcConn.end();
});
@ -190,7 +190,7 @@ export class SSHBackendProvider implements BackendBaseClass {
srcConn.on("end", () => {
this.clients.splice(this.clients.indexOf(client), 1);
destConn.close();
destConn.end();
});
},
);