mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Fixed missing isIPMatch(), #4172
This commit is contained in:
		
							parent
							
								
									5d93787164
								
							
						
					
					
						commit
						3633c9ff81
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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('@'); }
 | 
			
		||||
 | 
			
		||||
    // 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
 | 
			
		||||
    serverStart();
 | 
			
		||||
    CheckListenPort(args.relayport, args.relayportbind, StartWebRelayServer);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue