Added support for permessage deflate
Bryan Roe committed
Jul 16, 2020 at 23:08 UTC
db3ead8be675f7e429970f9634bfccb66bfbae1f
1 file changed
+3
-1
agents/meshcore.js
+3
-1
@@ -701,6 +701,7 @@ function createMeshCore(agent) {
701
if (xurl != null) {
702
xurl = xurl.split('$').join('%24').split('@').join('%40'); // Escape the $ and @ characters
703
var woptions = http.parseUri(xurl);
704
+ woptions.perMessageDeflate = true;
705
woptions.rejectUnauthorized = 0;
706
//sendConsoleText(JSON.stringify(woptions));
707
//sendConsoleText('TUNNEL: ' + JSON.stringify(data));
@@ -1188,7 +1189,8 @@ function createMeshCore(agent) {
1189
1190
function onTunnelClosed() {
1191
if (tunnels[this.httprequest.index] == null) return; // Stop duplicate calls.
1191
- //sendConsoleText("Tunnel #" + this.httprequest.index + " closed.", this.httprequest.sessionid);
1192
+
1193
+// sendConsoleText("Tunnel #" + this.httprequest.index + " closed. Sent -> " + this.bytesSent_uncompressed + ' bytes (uncompressed), ' + this.bytesSent_actual + ' bytes (actual), ' + this.bytesSent_ratio + '% compression', this.httprequest.sessionid);
1194
delete tunnels[this.httprequest.index];
1195
1196
/*