diff --git a/agents/MeshCmd-signed.exe b/agents/MeshCmd-signed.exe index c07a2f5d..e4f98a07 100644 Binary files a/agents/MeshCmd-signed.exe and b/agents/MeshCmd-signed.exe differ diff --git a/agents/MeshCmd64-signed.exe b/agents/MeshCmd64-signed.exe index ca63cfbd..66acf817 100644 Binary files a/agents/MeshCmd64-signed.exe and b/agents/MeshCmd64-signed.exe differ diff --git a/agents/MeshService-signed.exe b/agents/MeshService-signed.exe index 46c29dbe..11974d61 100644 Binary files a/agents/MeshService-signed.exe and b/agents/MeshService-signed.exe differ diff --git a/agents/MeshService.exe b/agents/MeshService.exe index e555689b..db9e59f7 100644 Binary files a/agents/MeshService.exe and b/agents/MeshService.exe differ diff --git a/agents/MeshService64-signed.exe b/agents/MeshService64-signed.exe index 1fcb7935..4ea4aa9e 100644 Binary files a/agents/MeshService64-signed.exe and b/agents/MeshService64-signed.exe differ diff --git a/agents/MeshService64.exe b/agents/MeshService64.exe index befe9503..e27d6109 100644 Binary files a/agents/MeshService64.exe and b/agents/MeshService64.exe differ diff --git a/agents/meshagent_arm b/agents/meshagent_arm index 4520bcdc..3dc983ec 100644 Binary files a/agents/meshagent_arm and b/agents/meshagent_arm differ diff --git a/agents/meshagent_arm-linaro b/agents/meshagent_arm-linaro index 36143292..5eaf834d 100644 Binary files a/agents/meshagent_arm-linaro and b/agents/meshagent_arm-linaro differ diff --git a/agents/meshagent_arm64 b/agents/meshagent_arm64 index 0eb3f806..9c9273bd 100644 Binary files a/agents/meshagent_arm64 and b/agents/meshagent_arm64 differ diff --git a/agents/meshagent_armhf b/agents/meshagent_armhf index 6e07c65e..8a668297 100644 Binary files a/agents/meshagent_armhf and b/agents/meshagent_armhf differ diff --git a/agents/meshagent_freebsd_x86-64 b/agents/meshagent_freebsd_x86-64 index 8c1f317f..8b70a5dd 100644 Binary files a/agents/meshagent_freebsd_x86-64 and b/agents/meshagent_freebsd_x86-64 differ diff --git a/agents/meshagent_mips b/agents/meshagent_mips index 2ce4a25e..03d18542 100644 Binary files a/agents/meshagent_mips and b/agents/meshagent_mips differ diff --git a/agents/meshagent_osx-x86-64 b/agents/meshagent_osx-x86-64 index cd486dfe..f8bc6a9f 100644 Binary files a/agents/meshagent_osx-x86-64 and b/agents/meshagent_osx-x86-64 differ diff --git a/agents/meshagent_pogo b/agents/meshagent_pogo index 34904f3a..2decb9ff 100644 Binary files a/agents/meshagent_pogo and b/agents/meshagent_pogo differ diff --git a/agents/meshagent_poky b/agents/meshagent_poky index 91616a3c..696b1f54 100644 Binary files a/agents/meshagent_poky and b/agents/meshagent_poky differ diff --git a/agents/meshagent_poky64 b/agents/meshagent_poky64 index 257011a4..c86cc578 100644 Binary files a/agents/meshagent_poky64 and b/agents/meshagent_poky64 differ diff --git a/agents/meshagent_x86 b/agents/meshagent_x86 index 044a32ea..355b7f1a 100644 Binary files a/agents/meshagent_x86 and b/agents/meshagent_x86 differ diff --git a/agents/meshagent_x86-64 b/agents/meshagent_x86-64 index 01ca85c0..ac612813 100644 Binary files a/agents/meshagent_x86-64 and b/agents/meshagent_x86-64 differ diff --git a/agents/meshagent_x86-64_nokvm b/agents/meshagent_x86-64_nokvm index e1db82b0..5a343109 100644 Binary files a/agents/meshagent_x86-64_nokvm and b/agents/meshagent_x86-64_nokvm differ diff --git a/agents/meshagent_x86_nokvm b/agents/meshagent_x86_nokvm index f07065f4..b8f91c0e 100644 Binary files a/agents/meshagent_x86_nokvm and b/agents/meshagent_x86_nokvm differ diff --git a/amt/amt-wsman-comm.js b/amt/amt-wsman-comm.js index a8bbbc81..8e1c3042 100644 --- a/amt/amt-wsman-comm.js +++ b/amt/amt-wsman-comm.js @@ -167,7 +167,32 @@ var CreateWsmanComm = function (host, port, user, pass, tls, tlsoptions, parent, obj.socketState = 1; obj.kerberosDone = 0; - if (obj.mode==1 ) { //Direct + if ((obj.parent != null) && (obj.mode === 2) || (obj.mode === 3)) { // CIRA and APF + if (obj.mode == 2) { // CIRA + var ciraconn = obj.parent.mpsserver.ciraConnections[obj.host]; + obj.socket = obj.parent.mpsserver.SetupCiraChannel(ciraconn, obj.port); + } else { // APF + var apfconn = obj.parent.apfserver.apfConnections[obj.host]; + obj.socket = obj.parent.apfserver.SetupCiraChannel(apfconn, obj.port); + } + obj.socket.onData = function (ccon, data) { obj.xxOnSocketData(data); } + obj.socket.onStateChange = function (ccon, state) { + if (state == 0) { + try { + obj.socketParseState = 0; + obj.socketAccumulator = ''; + obj.socketHeader = null; + obj.socketData = ''; + obj.socketState = 0; + obj.xxOnSocketClosed(); + } catch (e) { } + } else if (state == 2) { + // channel open success + obj.xxOnSocketConnected(); + } + } + } else { + // Direct connection if (obj.xtls != 1) { // Connect without TLS obj.socket = new obj.net.Socket(); @@ -196,33 +221,6 @@ var CreateWsmanComm = function (host, port, user, pass, tls, tlsoptions, parent, obj.socket.on('error', function (e) { if (e.message && e.message.indexOf('sslv3 alert bad record mac') >= 0) { obj.xtlsMethod = 1 - obj.xtlsMethod; } }); } obj.socket.setNoDelay(true); // Disable nagle. We will encode each WSMAN request as a single send block and want to send it at once. This may help Intel AMT handle pipelining? - } else if (obj.mode==2 || obj.mode==3) { // CIRA and APF - if (obj.mode==2) { // CIRA - var ciraconn = obj.parent.mpsserver.ciraConnections[obj.host]; - obj.socket = obj.parent.mpsserver.SetupCiraChannel(ciraconn, obj.port); - } else { //APF - var apfconn = obj.parent.apfserver.apfConnections[obj.host]; - obj.socket = obj.parent.apfserver.SetupCiraChannel(apfconn, obj.port); - } - obj.socket.onData = function (ccon, data) { - obj.xxOnSocketData(data); - } - - obj.socket.onStateChange = function (ccon, state) { - if (state == 0) { - try { - obj.socketParseState = 0; - obj.socketAccumulator = ''; - obj.socketHeader = null; - obj.socketData = ''; - obj.socketState = 0; - obj.xxOnSocketClosed(); - } catch (e) { } - } else if (state == 2) { - // channel open success - obj.xxOnSocketConnected(); - } - } } } diff --git a/package.json b/package.json index 847f7e7b..9e024683 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.5.1-j", + "version": "0.5.1-k", "keywords": [ "Remote Management", "Intel AMT",