diff --git a/.greenlockrc b/.greenlockrc
deleted file mode 100644
index 0e959e84..00000000
--- a/.greenlockrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "manager": "C:\\Users\\Default.DESKTOP-M9I88C9\\Desktop\\AmtWebApp\\meshcentral\\letsencrypt.js"
-}
\ No newline at end of file
diff --git a/agents/meshcore.js b/agents/meshcore.js
index ba7b9874..526fffa4 100644
--- a/agents/meshcore.js
+++ b/agents/meshcore.js
@@ -1046,11 +1046,11 @@ function createMeshCore(agent) {
if ((data == 'c') || (data == 'cr')) { this.httprequest.state = 1; /*sendConsoleText("Tunnel #" + this.httprequest.index + " now active", this.httprequest.sessionid);*/ }
} else {
// Handle tunnel data
- if (this.httprequest.protocol == 0) { // 1 = Terminal, 2 = Desktop, 5 = Files, 6 = PowerShell
+ if (this.httprequest.protocol == 0) { // 1 = Terminal (admin), 2 = Desktop, 5 = Files, 6 = PowerShell (admin), 7 = Terminal (user), 8 = PowerShell (user)
// Take a look at the protocol
this.httprequest.protocol = parseInt(data);
if (typeof this.httprequest.protocol != 'number') { this.httprequest.protocol = 0; }
- if ((this.httprequest.protocol == 1) || (this.httprequest.protocol == 6)) {
+ if ((this.httprequest.protocol == 1) || (this.httprequest.protocol == 6) || (this.httprequest.protocol == 7) || (this.httprequest.protocol == 8)) {
// Check user access rights for terminal
if (((this.httprequest.rights & MESHRIGHT_REMOTECONTROL) == 0) || ((this.httprequest.rights != 0xFFFFFFFF) && ((this.httprequest.rights & MESHRIGHT_NOTERMINAL) != 0))) {
// Disengage this tunnel, user does not have the rights to do this!!
@@ -1083,10 +1083,10 @@ function createMeshCore(agent) {
// Remote terminal using native pipes
if (process.platform == "win32") {
try {
- if ((this.httprequest.protocol == 6) && (require('win-terminal').PowerShellCapable() == true)) {
- this.httprequest._term = require('win-terminal').StartPowerShell(80, 25);
+ if (((this.httprequest.protocol == 6) || (this.httprequest.protocol == 8)) && (require('win-terminal').PowerShellCapable() == true)) {
+ this.httprequest._term = require('win-terminal').StartPowerShell(80, 25); // TODO: Start as logged in used when protocol is 8
} else {
- this.httprequest._term = require('win-terminal').Start(80, 25);
+ this.httprequest._term = require('win-terminal').Start(80, 25); // TODO: Start as logged in used when protocol is 7
}
}
catch (e) {
@@ -1100,13 +1100,13 @@ function createMeshCore(agent) {
this.prependListener('end', function () { this.httprequest._term.end(function () { console.log('Terminal was closed'); }); });
} else {
if (fs.existsSync("/usr/bin/python") && fs.existsSync("/bin/bash")) {
- this.httprequest.process = childProcess.execFile("/usr/bin/python", [ "python", "-c", "import pty; pty.spawn([\"/bin/bash\"])" ]);
+ this.httprequest.process = childProcess.execFile("/usr/bin/python", ["python", "-c", "import pty; pty.spawn([\"/bin/bash\"])"], { uid: (this.httprequest.protocol == 7) ? require('user-sessions').consoleUid() : null }); // Start as active user
if (process.platform == 'linux') { this.httprequest.process.stdin.write("export TERM='xterm'\nalias ls='ls --color=auto'\nclear\n"); }
} else if (fs.existsSync("/bin/bash")) {
- this.httprequest.process = childProcess.execFile("/bin/bash", ["bash", "-i"], { type: childProcess.SpawnTypes.TERM });
+ this.httprequest.process = childProcess.execFile("/bin/bash", ["bash", "-i"], { type: childProcess.SpawnTypes.TERM, uid: (this.httprequest.protocol == 7) ? require('user-sessions').consoleUid() : null }); // Start as active user
if (process.platform == 'linux') { this.httprequest.process.stdin.write("alias ls='ls --color=auto'\nclear\n"); }
} else {
- this.httprequest.process = childProcess.execFile("/bin/sh", ["sh"], { type: childProcess.SpawnTypes.TERM }); // , uid: require('user-sessions').consoleUid()
+ this.httprequest.process = childProcess.execFile("/bin/sh", ["sh"], { type: childProcess.SpawnTypes.TERM, uid: (this.httprequest.protocol == 7)?require('user-sessions').consoleUid():null }); // Start as active user
if (process.platform == 'linux') { this.httprequest.process.stdin.write("stty erase ^H\nalias ls='ls --color=auto'\nPS1='\\u@\\h:\\w\\$ '\nclear\n"); }
}
this.httprequest.process.tunnel = this;
diff --git a/package.json b/package.json
index 93da2688..392d4926 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "meshcentral",
- "version": "0.4.4-s",
+ "version": "0.4.4-u",
"keywords": [
"Remote Management",
"Intel AMT",
diff --git a/views/default-min.handlebars b/views/default-min.handlebars
index 1004a478..32da1a27 100644
--- a/views/default-min.handlebars
+++ b/views/default-min.handlebars
@@ -1,4 +1,4 @@
-
{{{title}}}
My Devices My Account My Events My Files My Users My Server
General Desktop Terminal Files Events Details Intel® AMT Console Plugins
Server disconnected ,click to reconnect .
My Devices No device groups.
My Account Device Groups ( New )
My Events Show Last 60 Last 120 Last 250 Last 500 Last 1000
My Files These files are shared publicly, click "link" to get public url.
✓
✗
My Server Server Statistics
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Show Last 60 Last 120 Last 250 Last 500 Last 1000
General -
Events - Show Last 60 Last 120 Last 250 Last 500 Last 1000
My Server Plugins Name Description Link Version Latest Status Action
No plugins on server.
File Selection
Local file upload Server file selection Agent Remote Desktop Scaling
100% 87.5% 75% 62.5% 50% 37.5% 25% 12.5% Frame rate
Fast Medium Slow Very slow Intel® AMT Hardware KVM Image Encoding
RLE8, Fastest RLE16, Recommended RAW8, Slow RAW16, Very Slow {{{title}}}
My Devices My Account My Events My Files My Users My Server
General Desktop Terminal Files Events Details Intel® AMT Console Plugins
Server disconnected ,click to reconnect .
My Devices No device groups.
My Account Device Groups ( New )
My Events Show Last 60 Last 120 Last 250 Last 500 Last 1000
My Files These files are shared publicly, click "link" to get public url.
✓
✗
My Server Server Statistics
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Show Last 60 Last 120 Last 250 Last 500 Last 1000
General -
Events - Show Last 60 Last 120 Last 250 Last 500 Last 1000
My Server Plugins Name Description Link Version Latest Status Action
No plugins on server.
File Selection
Local file upload Server file selection Agent Remote Desktop Scaling
100% 87.5% 75% 62.5% 50% 37.5% 25% 12.5% Frame rate
Fast Medium Slow Very slow Intel® AMT Hardware KVM Image Encoding
RLE8, Fastest RLE16, Recommended RAW8, Slow RAW16, Very Slow {{{title}}}
Mes Appareils Mon Compte Mes Événements Mes Dossiers Mes Utilisateurs Mon Serveur
General Desktop Terminal Files Events Details Intel® AMT Console Plugins
Server disconnected ,click to reconnect .
Mes Appareils Aucun groupe d'appareils.
Mon Compte Device Groups ( Nouveau )
Mes Événements Show 60 dernières 120 dernières 250 dernières 500 dernières 1000 derniers
Mes Dossiers Ces fichiers sont partagés publiquement, cliquez sur "lien" pour obtenir une URL publique.
✓
✗
Mon Serveur Server Statistics
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Show 60 dernières 120 dernières 250 dernières 500 dernières 1000 derniers
General -
Events - Show 60 dernières 120 dernières 250 dernières 500 dernières 1000 derniers
My Server Plugins Nom Description Link Version Latest Statut Action
No plugins on server.
File Selection
Local file upload Server file selection Agent Remote Desktop Mise à l'échelle
100% 87.5% 75% 62.5% 50% 37.5% 25% 12.5% Frame rate
Fast Medium Lent Very slow Intel® AMT Hardware KVM Image Encoding
RLE8, le plus rapide RLE16, recommandé RAW8, Slow RAW16, Very Slow {{{title}}}
Mes Appareils Mon Compte Mes Événements Mes Dossiers Mes Utilisateurs Mon Serveur
General Desktop Terminal Files Events Details Intel® AMT Console Plugins
Server disconnected ,click to reconnect .
Mes Appareils Aucun groupe d'appareils.
Mon Compte Device Groups ( Nouveau )
Mes Événements Show 60 dernières 120 dernières 250 dernières 500 dernières 1000 derniers
Mes Dossiers Ces fichiers sont partagés publiquement, cliquez sur "lien" pour obtenir une URL publique.
✓
✗
Mon Serveur Server Statistics
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Show 60 dernières 120 dernières 250 dernières 500 dernières 1000 derniers
General -
Events - Show 60 dernières 120 dernières 250 dernières 500 dernières 1000 derniers
My Server Plugins Nom Description Link Version Latest Statut Action
No plugins on server.
File Selection
Local file upload Server file selection Agent Remote Desktop Mise à l'échelle
100% 87.5% 75% 62.5% 50% 37.5% 25% 12.5% Frame rate
Fast Medium Lent Very slow Intel® AMT Hardware KVM Image Encoding
RLE8, le plus rapide RLE16, recommandé RAW8, Slow RAW16, Very Slow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{{title}}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- My Devices
- My Account
- My Events
- My Files
- My Users
- My Server
- My Plugins
-
-
-
-
-
-
- General
- Desktop
- Terminal
- Files
- Events
- Details
- Intel® AMT
- Console
- Plugins
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Server disconnected , click to reconnect .
-
-
-
My Devices
-
-
-
-
-
-
-
-
-
- No device groups.
-
-
-
-
-
-
-
-
-
X
-
Location Results
-
-
-
-
-
-
-
-
-
My Account
-
-
-
-
Device Groups
-
( New )
-
-
-
-
-
-
-
My Events
-
-
-
-
- Show
-
- Last 60
- Last 120
- Last 250
- Last 500
- Last 1000
-
-
-
-
-
-
-
-
-
-
-
My Files
-
-
-
-
These files are shared publicly, click "link" to get public url.
-
✓
-
✗
-
-
-
-
-
-
-
My Server
-
-
Server Statistics
-
-
-
-
My Plugins
-
-
- Name Description Link Version Latest Available Status Action
-
-
Notice:
MeshCentral plugins have been altered. Agent cores require may require an update before full features are available.
- Click
here to update all Mesh Agent cores.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
-
-
-
-
Remote computer is not powered on, click here to issue a power command.
-
-
-
-
-
-
⇲
-
↺
-
↻
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
-
-
-
-
Remote computer is not powered on, click here to issue a power command.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Show
-
- Last 60
- Last 120
- Last 250
- Last 500
- Last 1000
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
General -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Events -
-
-
-
-
-
- Show
-
- Last 60
- Last 120
- Last 250
- Last 500
- Last 1000
-
-
-
-
-
-
-
-
-
-
My Server Stats
-
-
-
- Connections
- Memory
-
-
- Last 3 hours
- Last 8 hours
- Last day
- Last week
- Last 30 days
-
-
-
-
-
- Log-X
-
-
-
-
-
-
My Server Tracing
-
-
- Show
-
- Last 100
- Last 250
- Last 500
- Last 1000
-
-
-
-
-
-
- None
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
File Selection
-
- Local file upload
- Server file selection
-
-
-
-
-
-
-
-
Agent Remote Desktop
-
-
-
Scaling
-
- 100%
- 87.5%
- 75%
- 62.5%
- 50%
- 37.5%
- 25%
- 12.5%
-
-
-
-
Frame rate
-
- Fast
- Medium
- Slow
- Very slow
-
-
-
-
-
Intel® AMT Hardware KVM
-
-
Image Encoding
-
- RLE8, Fastest
- RLE16, Recommended
- RAW8, Slow
- RAW16, Very Slow
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-