Skip to content

Commit

Permalink
emergency DDOS fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ION606 committed Dec 22, 2023
2 parents 54a32d8 + 860ec7c commit 2cda2d8
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,40 @@ app.use('/scripts', express.static('../scripts'));
const wsInstance = expressWs(app);


//#region CALLING
// TURN code
/*
const turnConfig = {
"listeningPort": 4000,
"relayIps": ["127.0.0.1"],
"useUdp": false,
"useTcp": true
}
// Create and configure the STUN server
import turn from 'node-turn';
const turnServer = new turn({
authMech: 'none',
debugLevel: 'INFO',
listeningIps: ['0.0.0.0'],
turnConfig
});
// // stand-in for database?
// const users = new Map();
// const socketsToUsers = {};
turnServer.on('listening', () => {
console.log('STUN server is running on port', turnServer.listeningPort);
});
// const io = initCallSockets(server);
//#endregion
turnServer.on('connection', async (connection) => {
console.log(connection);
});
turnServer.on('error', async (err) => {
console.log(err);
});
turnServer.start();
*/


app.put('/msgImg', async (req, res) => {
Expand Down

0 comments on commit 2cda2d8

Please sign in to comment.