From 287693ec65f882cc09232fd1200d909dcd21b477 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Sep 2022 23:35:14 +0300 Subject: [PATCH 1/8] LINXD-222: Added log for request; Accept request withour Cert and unauthorized --- app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 8b9e407..3e68df1 100644 --- a/app.js +++ b/app.js @@ -47,7 +47,9 @@ app.use('/sfu', express.static(path.join(__dirname, 'public'))) // SSL cert for HTTPS access const options = { key: fs.readFileSync('./server/ssl/key.pem', 'utf-8'), - cert: fs.readFileSync('./server/ssl/cert.pem', 'utf-8') + cert: fs.readFileSync('./server/ssl/cert.pem', 'utf-8'), + requestCert: false, + rejectUnauthorized: false } const httpsServer = https.createServer(options, app) @@ -57,7 +59,11 @@ httpsServer.listen(process.env.PORT, () => { }) const io = new Server(httpsServer, { - allowEIO3: true + allowEIO3: true, + allowRequest: (req) => { + console.log('req', req); + return true; + } }); // socket.io namespace (could represent a room?) -- 2.37.1 From 9bfacaa439d707d41609c6ec78b198ce30960228 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Sep 2022 23:38:44 +0300 Subject: [PATCH 2/8] LINXD-2222: Update --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 3e68df1..bcea843 100644 --- a/app.js +++ b/app.js @@ -48,8 +48,8 @@ app.use('/sfu', express.static(path.join(__dirname, 'public'))) const options = { key: fs.readFileSync('./server/ssl/key.pem', 'utf-8'), cert: fs.readFileSync('./server/ssl/cert.pem', 'utf-8'), - requestCert: false, - rejectUnauthorized: false + // requestCert: false, + // rejectUnauthorized: false } const httpsServer = https.createServer(options, app) -- 2.37.1 From dc4ff89c4289d92f87c87ea5eb4f24c9c6f2c4ef Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Sep 2022 23:39:28 +0300 Subject: [PATCH 3/8] LINXD-2222: Update --- app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index bcea843..dba018f 100644 --- a/app.js +++ b/app.js @@ -60,10 +60,10 @@ httpsServer.listen(process.env.PORT, () => { const io = new Server(httpsServer, { allowEIO3: true, - allowRequest: (req) => { - console.log('req', req); - return true; - } + // allowRequest: (req) => { + // console.log('req', req); + // return true; + // } }); // socket.io namespace (could represent a room?) -- 2.37.1 From b7ef9bcdd48c3feaba94d3ebd8db296ce08853cf Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Sep 2022 23:40:03 +0300 Subject: [PATCH 4/8] LINXD-2222: Update --- app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index dba018f..bcea843 100644 --- a/app.js +++ b/app.js @@ -60,10 +60,10 @@ httpsServer.listen(process.env.PORT, () => { const io = new Server(httpsServer, { allowEIO3: true, - // allowRequest: (req) => { - // console.log('req', req); - // return true; - // } + allowRequest: (req) => { + console.log('req', req); + return true; + } }); // socket.io namespace (could represent a room?) -- 2.37.1 From 5d9a7da62d0b781b5f0d437be006b64432d02f81 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Sep 2022 23:46:24 +0300 Subject: [PATCH 5/8] LINXD-2222: Update --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index bcea843..9451d10 100644 --- a/app.js +++ b/app.js @@ -60,9 +60,9 @@ httpsServer.listen(process.env.PORT, () => { const io = new Server(httpsServer, { allowEIO3: true, - allowRequest: (req) => { + allowRequest: (req, next) => { console.log('req', req); - return true; + next() } }); -- 2.37.1 From 4522709a47a2b2005a137793020a2cd6ee1c95cb Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Mon, 19 Sep 2022 23:47:55 +0300 Subject: [PATCH 6/8] LINXD-2222: Update --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 9451d10..b404714 100644 --- a/app.js +++ b/app.js @@ -62,7 +62,7 @@ const io = new Server(httpsServer, { allowEIO3: true, allowRequest: (req, next) => { console.log('req', req); - next() + next(null, true) } }); -- 2.37.1 From 7642718888d54b574710bf4857d2940d652a8f2d Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 20 Sep 2022 00:04:42 +0300 Subject: [PATCH 7/8] LINXD-2222: Update --- app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index b404714..f3d8e9f 100644 --- a/app.js +++ b/app.js @@ -48,8 +48,8 @@ app.use('/sfu', express.static(path.join(__dirname, 'public'))) const options = { key: fs.readFileSync('./server/ssl/key.pem', 'utf-8'), cert: fs.readFileSync('./server/ssl/cert.pem', 'utf-8'), - // requestCert: false, - // rejectUnauthorized: false + requestCert: false, + rejectUnauthorized: false } const httpsServer = https.createServer(options, app) @@ -60,6 +60,7 @@ httpsServer.listen(process.env.PORT, () => { const io = new Server(httpsServer, { allowEIO3: true, + origins: ["*:*"], allowRequest: (req, next) => { console.log('req', req); next(null, true) -- 2.37.1 From acf28fb7ae104d652f55041f41aab26070a027de Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 20 Sep 2022 09:40:15 +0300 Subject: [PATCH 8/8] LINXD-2222: Use default port 3000 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 551a6ac..6d8b7b8 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -PORT=3001 +PORT=3000 IP=0.0.0.0 # Listening IPv4 or IPv6. ANNOUNCED_IP=185.8.154.190 # Announced IPv4 or IPv6 (useful when running mediasoup behind NAT with private IP). -- 2.37.1