From 65d68f33dc33c3d9014989c119d73f10b20ef576 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Wed, 20 May 2020 20:23:09 -0600 Subject: [PATCH] Allow passthrough --- core/servers/login/telnet.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/servers/login/telnet.js b/core/servers/login/telnet.js index 7bb938a4..318dd9fc 100644 --- a/core/servers/login/telnet.js +++ b/core/servers/login/telnet.js @@ -24,8 +24,8 @@ class TelnetClient { constructor(socket) { Client.apply(this, socket, socket); - this.setInputOutput(socket, socket); this.socket = new TelnetSocket(socket); + this.setInputOutput(this.socket, this.socket); // // Wait up to 3s to hear about from our terminal type request @@ -50,6 +50,8 @@ class TelnetClient { this.emit('end'); }); + // :TODO: handle 'command error' event + this.socket.on('DO', command => { switch (command.option) { case Options.ECHO : @@ -178,6 +180,14 @@ class TelnetClient { }); } + get dataPassthrough() { + return this.socket.passthrough; + } + + set dataPassthrough(passthrough) { + this.socket.passthrough = passthrough; + } + disconnect() { try { return this.socket.rawSocket.end();