diff --git a/server/endpoints.js b/server/endpoints.js index d7cff81..d2c5927 100644 --- a/server/endpoints.js +++ b/server/endpoints.js @@ -339,6 +339,14 @@ router.get('/server_time', (req, res) => { router.get('/ping', (req, res) => res.send('pong')); +// techkrzysiek's WebRTC plugin integration from the Miedzyzdroje server. +router.get('/webrtc-audio-flags.json', (req, res) => res.json({disable3las: false})); +// /webrtc-audio.conf should serve a list of supported WebRTC endpoints; like this "56000:https://webrtc.fmdx.pro/miedzyzdroje_56k/whep"; each entry is seperated by a semicolon +// We should be able to use mediamtx for SDP/WHEP and the WebRTC itself. + +// Testing only! TODO: Add this to config +router.get('/webrtc-audio.conf', (req, res) => res.send("192000;https://batorego.flerken.pl.eu.org/webrtc/whep192/whep")); + const logHistory = {}; // Function to check if the ID has been logged within the last 60 minutes diff --git a/server/web.js b/server/web.js index 439f371..1a0d673 100644 --- a/server/web.js +++ b/server/web.js @@ -114,7 +114,7 @@ wss.on('connection', (ws, request) => { const command = helpers.antispamProtection(message, clientIp, ws, userCommands, lastWarn, userCommandHistory, '18', 'text', 16 * 1024); if (!clientIp.includes("127.0.0.1")) { - if (!request.session.isAdminAuthenticated && (command.startsWith('X') || command.startsWith('Y') || command.startsWith("D") || command.startsWith("")) || + if (((command.startsWith('X') || command.startsWith('Y')) && !request.session.isAdminAuthenticated) || ((command.startsWith('F') || command.startsWith('W')) && serverConfig.bwSwitch === false)) { logWarn(`User \x1b[90m${clientIp}\x1b[0m attempted to send a potentially dangerous command: ${command.slice(0, 64)}.`); return; diff --git a/views/audioonly.ejs b/views/audioonly.ejs index 5778253..3295d5c 100644 --- a/views/audioonly.ejs +++ b/views/audioonly.ejs @@ -66,6 +66,6 @@
- +