From 85df2da68988e47aa6036aeee6ce7ed15a943f7c Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Thu, 16 Jul 2020 23:08:59 -0700 Subject: [PATCH] Added support for permessage deflate --- agents/meshcore.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index ae4f6007..187a1135 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -701,6 +701,7 @@ function createMeshCore(agent) { if (xurl != null) { xurl = xurl.split('$').join('%24').split('@').join('%40'); // Escape the $ and @ characters var woptions = http.parseUri(xurl); + woptions.perMessageDeflate = true; woptions.rejectUnauthorized = 0; //sendConsoleText(JSON.stringify(woptions)); //sendConsoleText('TUNNEL: ' + JSON.stringify(data)); @@ -1188,7 +1189,8 @@ function createMeshCore(agent) { function onTunnelClosed() { if (tunnels[this.httprequest.index] == null) return; // Stop duplicate calls. - //sendConsoleText("Tunnel #" + this.httprequest.index + " closed.", this.httprequest.sessionid); + +// sendConsoleText("Tunnel #" + this.httprequest.index + " closed. Sent -> " + this.bytesSent_uncompressed + ' bytes (uncompressed), ' + this.bytesSent_actual + ' bytes (actual), ' + this.bytesSent_ratio + '% compression', this.httprequest.sessionid); delete tunnels[this.httprequest.index]; /*