From 7c79dbcda177845f421287c1dc15e44cc3e97743 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Thu, 5 Sep 2024 12:57:29 +0100 Subject: [PATCH] fix peering traffic #5714 Signed-off-by: Simon Smith --- agents/meshcore.js | 1 + 1 file changed, 1 insertion(+) diff --git a/agents/meshcore.js b/agents/meshcore.js index 254ac9e1..0d323d3d 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -2763,6 +2763,7 @@ function onTunnelData(data) // Handle tunnel data if (this.httprequest.protocol == 0) { // 1 = Terminal (admin), 2 = Desktop, 5 = Files, 6 = PowerShell (admin), 7 = Plugin Data Exchange, 8 = Terminal (user), 9 = PowerShell (user), 10 = FileTransfer // Take a look at the protocol + if (data[0] == 123) { data = data.toString(); } // convert to string to fix binary data coming from peer servers if ((data.length > 3) && (data[0] == '{')) { onTunnelControlData(data, this); return; } this.httprequest.protocol = parseInt(data); if (typeof this.httprequest.protocol != 'number') { this.httprequest.protocol = 0; }