mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 07:05:52 -05:00
Fixed missing isIPMatch(), #4172
This commit is contained in:
parent
5d93787164
commit
3633c9ff81
@ -257,6 +257,13 @@ module.exports.CreateWebRelayServer = function (parent, db, args, certificates,
|
|||||||
|
|
||||||
function getRandomPassword() { return Buffer.from(require('crypto').randomBytes(9), 'binary').toString('base64').split('/').join('@'); }
|
function getRandomPassword() { return Buffer.from(require('crypto').randomBytes(9), 'binary').toString('base64').split('/').join('@'); }
|
||||||
|
|
||||||
|
// Perform a IP match against a list
|
||||||
|
function isIPMatch(ip, matchList) {
|
||||||
|
const ipcheck = require('ipcheck');
|
||||||
|
for (var i in matchList) { if (ipcheck.match(ip, matchList[i]) == true) return true; }
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Start up the web relay server
|
// Start up the web relay server
|
||||||
serverStart();
|
serverStart();
|
||||||
CheckListenPort(args.relayport, args.relayportbind, StartWebRelayServer);
|
CheckListenPort(args.relayport, args.relayportbind, StartWebRelayServer);
|
||||||
|
Loading…
Reference in New Issue
Block a user