something

This commit is contained in:
2026-04-03 09:55:42 +02:00
parent 94710dbd9e
commit 28f5796ee5
17 changed files with 75 additions and 157 deletions
-9
View File
@@ -5,15 +5,6 @@ const { getIpAddress } = require("../helpers.js")
const audioWss = new WebSocket.Server({ noServer: true, skipUTF8Validation: true });
audioWss.on('connection', (ws, request) => {
const clientIp = getIpAddress(request);
if (serverConfig.webserver.banlist?.includes(clientIp)) {
ws.close(1008, 'Banned IP');
return;
}
});
audio_pipe.on('data', (chunk) => {
audioWss.clients.forEach((client) => {
if (client.readyState === WebSocket.OPEN) client.send(chunk, {binary: true, compress: false});