1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

opera vpn websocket kick

This commit is contained in:
NoobishSVK
2024-11-03 22:39:38 +01:00
parent 4500006749
commit 578b2b1864

View File

@@ -387,6 +387,10 @@ wss.on('connection', (ws, request) => {
const options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit' }; const options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit' };
const connectionTime = new Date().toLocaleString([], options); const connectionTime = new Date().toLocaleString([], options);
if (locationInfo.org?.includes("AS205016 HERN Labs AB")) { // anti opera VPN block
return;
}
if(locationInfo.country === undefined) { if(locationInfo.country === undefined) {
const userData = { ip: clientIp, location: 'Unknown', time: connectionTime, instance: ws }; const userData = { ip: clientIp, location: 'Unknown', time: connectionTime, instance: ws };
storage.connectedUsers.push(userData); storage.connectedUsers.push(userData);