mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved MeshCentral1 migration, improved MeshAgent
This commit is contained in:
parent
801567f564
commit
4bfec1ba61
17 changed files with 22 additions and 12 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -31,7 +31,7 @@ var settings = {
|
|||
// Check the server certificate fingerprint
|
||||
function onVerifyServer(clientName, certs) {
|
||||
try { for (var i in certs) { if (certs[i].fingerprint.replace(/:/g, '') == settings.serverHttpsHash) { return; } } } catch (e) { }
|
||||
if (serverhash != null) { console.log('Error: Failed to verify server certificate.'); return false; }
|
||||
if (serverhash != null) { console.log('Error: Failed to verify server certificate.'); throw 'Invalid server certificate'; }
|
||||
}
|
||||
|
||||
// Print a debug message
|
||||
|
|
|
@ -290,8 +290,11 @@ function createMeshCore(agent) {
|
|||
// Create a new tunnel object
|
||||
var xurl = getServerTargetUrlEx(data.value);
|
||||
if (xurl != null) {
|
||||
var tunnel = http.request(http.parseUri(xurl));
|
||||
var woptions = http.parseUri(xurl);
|
||||
sendConsoleText(JSON.stringify(woptions));
|
||||
var tunnel = http.request(woptions);
|
||||
tunnel.upgrade = onTunnelUpgrade;
|
||||
tunnel.onerror = function (e) { sendConsoleText('ERROR: ' + JSON.stringify(e)); }
|
||||
tunnel.sessionid = data.sessionid;
|
||||
tunnel.rights = data.rights;
|
||||
tunnel.state = 0;
|
||||
|
@ -775,6 +778,7 @@ function createMeshCore(agent) {
|
|||
} catch (e) { response = 'Invalid HTTP websocket request'; }
|
||||
if (httprequest != null) {
|
||||
httprequest.upgrade = onWebSocketUpgrade;
|
||||
httprequest.onerror = function (e) { sendConsoleText('ERROR: ' + JSON.stringify(e)); }
|
||||
|
||||
var index = 1;
|
||||
while (consoleWebSockets[index]) { index++; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue