mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed tunnel ping/pong that would corrupt traffic.
This commit is contained in:
parent
154c503e97
commit
eacc7c91b2
5 changed files with 13 additions and 2 deletions
|
@ -2227,7 +2227,8 @@ function OnWebSocket(msg, s, head) {
|
|||
if (this.parent.tunneling == false) {
|
||||
msg = msg.toString();
|
||||
if ((msg == 'c') || (msg == 'cr')) {
|
||||
this.parent.tunneling = true; this.pipe(this.parent.tcp); this.parent.tcp.pipe(this); debug(1, "Tunnel active");
|
||||
// Pipe the connection, but don't pipe text websocket frames into the TCP socket.
|
||||
this.parent.tunneling = true; this.pipe(this.parent.tcp, { dataTypeSkip: 1 }); this.parent.tcp.pipe(this); debug(1, "Tunnel active");
|
||||
} else if ((msg.length > 6) && (msg.substring(0, 6) == 'error:')) {
|
||||
console.log(msg.substring(6));
|
||||
disconnectTunnel(this.tcp, this, msg.substring(6));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue