Updated snapshot metadata

This commit is contained in:
Bryan Roe 2020-05-21 13:22:58 -07:00
parent a0b6d235ec
commit 17d6a3604c

View File

@ -1018,6 +1018,7 @@ function createMeshCore(agent) {
s.httprequest = this; s.httprequest = this;
s.end = onTunnelClosed; s.end = onTunnelClosed;
s.tunnel = this; s.tunnel = this;
s.descriptorMetadata = "MeshAgent_relayTunnel";
if (require('MeshAgent').idleTimeout != null) if (require('MeshAgent').idleTimeout != null)
{ {
@ -1167,6 +1168,8 @@ function createMeshCore(agent) {
return; return;
} }
this.descriptorMetadata = "Remote Terminal";
if (process.platform == 'win32') if (process.platform == 'win32')
{ {
if (!require('win-terminal').PowerShellCapable() && (this.httprequest.protocol == 6 || this.httprequest.protocol == 9)) if (!require('win-terminal').PowerShellCapable() && (this.httprequest.protocol == 6 || this.httprequest.protocol == 9))
@ -1450,6 +1453,8 @@ function createMeshCore(agent) {
return; return;
} }
this.descriptorMetadata = "Remote KVM";
// Look for a TSID // Look for a TSID
var tsid = null; var tsid = null;
if ((this.httprequest.xoptions != null) && (typeof this.httprequest.xoptions.tsid == 'number')) { tsid = this.httprequest.xoptions.tsid; } if ((this.httprequest.xoptions != null) && (typeof this.httprequest.xoptions.tsid == 'number')) { tsid = this.httprequest.xoptions.tsid; }
@ -1655,7 +1660,12 @@ function createMeshCore(agent) {
this.on('data', onTunnelControlData); this.on('data', onTunnelControlData);
//this.write('MeshCore KVM Hello!1'); //this.write('MeshCore KVM Hello!1');
} else if (this.httprequest.protocol == 5) { } else if (this.httprequest.protocol == 5)
{
//
// Remote Files
//
// Check user access rights for files // Check user access rights for files
if (((this.httprequest.rights & MESHRIGHT_REMOTECONTROL) == 0) || ((this.httprequest.rights != 0xFFFFFFFF) && ((this.httprequest.rights & MESHRIGHT_NOFILES) != 0))) { if (((this.httprequest.rights & MESHRIGHT_REMOTECONTROL) == 0) || ((this.httprequest.rights != 0xFFFFFFFF) && ((this.httprequest.rights & MESHRIGHT_NOFILES) != 0))) {
// Disengage this tunnel, user does not have the rights to do this!! // Disengage this tunnel, user does not have the rights to do this!!
@ -1665,6 +1675,8 @@ function createMeshCore(agent) {
return; return;
} }
this.descriptorMetadata = "Remote Files";
// Add the files session to the count to update the server // Add the files session to the count to update the server
if (this.httprequest.userid != null) { if (this.httprequest.userid != null) {
if (tunnelUserCount.files[this.httprequest.userid] == null) { tunnelUserCount.files[this.httprequest.userid] = 1; } else { tunnelUserCount.files[this.httprequest.userid]++; } if (tunnelUserCount.files[this.httprequest.userid] == null) { tunnelUserCount.files[this.httprequest.userid] = 1; } else { tunnelUserCount.files[this.httprequest.userid]++; }