mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-23 06:34:54 +03:00
Fixed CIRA connections on latest NodeJS releases.
This commit is contained in:
parent
d387a0cc8b
commit
2a3a2ef2e8
@ -549,7 +549,7 @@ module.exports.CertificateOperations = function (parent) {
|
|||||||
// Accelerators, used to dispatch work to other processes
|
// Accelerators, used to dispatch work to other processes
|
||||||
const fork = require("child_process").fork;
|
const fork = require("child_process").fork;
|
||||||
const program = require("path").join(__dirname, "meshaccelerator.js");
|
const program = require("path").join(__dirname, "meshaccelerator.js");
|
||||||
const acceleratorTotalCount = 1; //require("os").cpus().length; // TODO: Check if this accelerator can scale.
|
const acceleratorTotalCount = require("os").cpus().length; // TODO: Check if this accelerator can scale.
|
||||||
var acceleratorCreateCount = acceleratorTotalCount;
|
var acceleratorCreateCount = acceleratorTotalCount;
|
||||||
var freeAccelerators = [];
|
var freeAccelerators = [];
|
||||||
var pendingAccelerator = [];
|
var pendingAccelerator = [];
|
||||||
|
@ -32,7 +32,8 @@ module.exports.CreateMpsServer = function (parent, db, args, certificates) {
|
|||||||
if (obj.args.mpstlsoffload) {
|
if (obj.args.mpstlsoffload) {
|
||||||
obj.server = net.createServer(onConnection);
|
obj.server = net.createServer(onConnection);
|
||||||
} else {
|
} else {
|
||||||
obj.server = tls.createServer({ key: certificates.mps.key, cert: certificates.mps.cert, requestCert: true, rejectUnauthorized: false, ciphers: "HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", secureOptions: constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_COMPRESSION }, onConnection);
|
// Note that in oder to support older Intel AMT CIRA connections, we have to turn on TLSv1.
|
||||||
|
obj.server = tls.createServer({ key: certificates.mps.key, cert: certificates.mps.cert, minVersion: 'TLSv1', requestCert: true, rejectUnauthorized: false, ciphers: "HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", secureOptions: constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_COMPRESSION }, onConnection);
|
||||||
//obj.server.on('secureConnection', function () { /*console.log('tlsServer secureConnection');*/ });
|
//obj.server.on('secureConnection', function () { /*console.log('tlsServer secureConnection');*/ });
|
||||||
//obj.server.on('error', function () { console.log('MPS tls server error'); });
|
//obj.server.on('error', function () { console.log('MPS tls server error'); });
|
||||||
obj.server.on('newSession', function (id, data, cb) { if (tlsSessionStoreCount > 1000) { tlsSessionStoreCount = 0; tlsSessionStore = {}; } tlsSessionStore[id.toString('hex')] = data; tlsSessionStoreCount++; cb(); });
|
obj.server.on('newSession', function (id, data, cb) { if (tlsSessionStoreCount > 1000) { tlsSessionStoreCount = 0; tlsSessionStore = {}; } tlsSessionStore[id.toString('hex')] = data; tlsSessionStoreCount++; cb(); });
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.3.3-o",
|
"version": "0.3.3-p",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
Loading…
Reference in New Issue
Block a user