1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Fixed agent desktop/terminal pipes + added IP location info store in the server

This commit is contained in:
Ylian Saint-Hilaire 2017-09-06 10:08:01 -07:00
parent dbaee9b2dc
commit c3005f4770
4 changed files with 47 additions and 31 deletions

View file

@ -373,10 +373,8 @@ function createMeshCore(agent) {
return;
}
// Setup remote desktop & terminal without using native pipes
if (useNativePipes == false) {
if (this.httprequest.desktop) { this.httprequest.desktop.kvm.write(data); return; }
if (this.httprequest.terminal) { this.httprequest.terminal.write(data); return; }
}
if ((this.httprequest.desktop) && (obj.useNativePipes == false)) { this.httprequest.desktop.kvm.write(data); return; }
if ((this.httprequest.terminal) && (obj.useNativePipes == false)) { this.httprequest.terminal.write(data); return; }
if (this.httprequest.state == 0) {
// Check if this is a relay connection
@ -388,7 +386,7 @@ function createMeshCore(agent) {
this.httprequest.protocol = parseInt(data);
if (typeof this.httprequest.protocol != 'number') { this.httprequest.protocol = 0; }
if (this.httprequest.protocol == 1) {
if (useNativePipes == false) {
if (obj.useNativePipes == false) {
// Remote Terminal without using native pipes
if (process.platform == "win32") {
this.httprequest.terminal = processManager.CreateProcess("%windir%\\system32\\cmd.exe");
@ -412,7 +410,7 @@ function createMeshCore(agent) {
}
}
if (this.httprequest.protocol == 2) {
if (useNativePipes == false) {
if (obj.useNativePipes == false) {
// Remote Desktop without using native pipes
this.httprequest.desktop = { state: 0, kvm: mesh.getRemoteDesktopStream(), tunnel: this };
this.httprequest.desktop.kvm.tunnel = this;