From 1e27592ce4ff177374760b98b2b32fbdb66c007b Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 30 Nov 2020 13:20:31 -0800 Subject: [PATCH] Agent core download and reverse proxy improvements. --- agents/meshcore.js | 2 +- views/default-mobile.handlebars | 4 ++++ views/default.handlebars | 1 + views/mstsc.handlebars | 4 ++++ views/terms-mobile.handlebars | 4 ++++ webserver.js | 9 +++++---- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index ad7c5e65..190e6b53 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -2274,7 +2274,7 @@ function createMeshCore(agent) { if ((process.cwd() != '//') && fs.existsSync(process.cwd() + 'core')) { cmd.path = process.cwd() + 'core'; } } } - MeshServerLogEx(49, [cmd.path], 'Download: \"' + cmd.path + '\"', this.httprequest); + MeshServerLogEx((cmd.ask == 'coredump')?104:49, [cmd.path], 'Download: \"' + cmd.path + '\"', this.httprequest); if ((cmd.path == null) || (this.filedownload != null)) { this.write({ action: 'download', sub: 'cancel', id: this.filedownload.id }); delete this.filedownload; } this.filedownload = { id: cmd.id, path: cmd.path, ptr: 0 } try { this.filedownload.f = fs.openSync(this.filedownload.path, 'rbN'); } catch (e) { this.write({ action: 'download', sub: 'cancel', id: this.filedownload.id }); delete this.filedownload; } diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 93622242..c104e217 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -31,6 +31,10 @@ {{{title}}}