telnet: added potentially missing WILL responses

This commit is contained in:
Eugene Pankov 2021-08-15 22:31:40 +02:00
parent af174933d6
commit 3584af524b
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -171,10 +171,12 @@ export class TelnetSession extends BaseSession {
if (command === TelnetCommands.DO) {
if (option === TelnetOptions.NEGO_WINDOW_SIZE) {
this.emitSize()
this.emitTelnet(TelnetCommands.WILL, option)
} else if (option === TelnetOptions.ECHO) {
this.echoEnabled = true
this.emitTelnet(TelnetCommands.WILL, option)
} else if (option === TelnetOptions.TERMINAL_TYPE) {
this.emitTelnet(TelnetCommands.WILL, option)
this.emitTelnetSuboption(option, Buffer.from([0, ...Buffer.from('XTERM-256COLOR')]))
} else {
this.logger.debug('(!) Unhandled option')