[mirotalk] - fix getSocketIP, update dep

This commit is contained in:
Miroslav Pejic
2025-11-04 01:56:24 +01:00
parent 89ca9972ff
commit 2631d7a22b
5 changed files with 20 additions and 17 deletions
+9 -6
View File
@@ -45,7 +45,7 @@ dependencies: {
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.6.23
* @version 1.6.24
*
*/
@@ -2226,11 +2226,14 @@ function getIP(req) {
* @returns string
*/
function getSocketIP(socket) {
return (
socket.handshake.headers['x-forwarded-for'] ||
socket.handshake.headers['X-Forwarded-For'] ||
socket.handshake.address
);
const forwarded = socket.handshake.headers['x-forwarded-for'] || socket.handshake.headers['X-Forwarded-For'];
if (forwarded) {
// Return only the first IP (client's real IP)
return forwarded.split(',')[0].trim();
}
return socket.handshake.address;
}
/**
+6 -6
View File
@@ -1,12 +1,12 @@
{
"name": "mirotalk",
"version": "1.6.23",
"version": "1.6.24",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mirotalk",
"version": "1.6.23",
"version": "1.6.24",
"license": "AGPL-3.0",
"dependencies": {
"@mattermost/client": "11.0.4",
@@ -29,7 +29,7 @@
"jsdom": "^27.1.0",
"jsonwebtoken": "^9.0.2",
"nodemailer": "^7.0.10",
"openai": "^6.7.0",
"openai": "^6.8.0",
"qs": "^6.14.0",
"socket.io": "^4.8.1",
"swagger-ui-express": "^5.0.1",
@@ -4213,9 +4213,9 @@
}
},
"node_modules/openai": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/openai/-/openai-6.7.0.tgz",
"integrity": "sha512-mgSQXa3O/UXTbA8qFzoa7aydbXBJR5dbLQXCRapAOtoNT+v69sLdKMZzgiakpqhclRnhPggPAXoniVGn2kMY2A==",
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/openai/-/openai-6.8.0.tgz",
"integrity": "sha512-GQUpzb9FoNkh1wqJuDIQ8e/Sq8dW+T3GakG6wJTXBE8Lufx1GaUcgZd087vhm8f/MiOzsTEkfRamYxzJ/jOoiw==",
"license": "Apache-2.0",
"bin": {
"openai": "bin/cli"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "mirotalk",
"version": "1.6.23",
"version": "1.6.24",
"description": "A free WebRTC browser-based video call",
"main": "server.js",
"scripts": {
@@ -61,7 +61,7 @@
"jsonwebtoken": "^9.0.2",
"js-yaml": "^4.1.0",
"nodemailer": "^7.0.10",
"openai": "^6.7.0",
"openai": "^6.8.0",
"qs": "^6.14.0",
"socket.io": "^4.8.1",
"swagger-ui-express": "^5.0.1",
+1 -1
View File
@@ -75,7 +75,7 @@ let brand = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
title: 'WebRTC P2P v1.6.23',
title: 'WebRTC P2P v1.6.24',
html: `
<button
id="support-button"
+2 -2
View File
@@ -15,7 +15,7 @@
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.6.23
* @version 1.6.24
*
*/
@@ -12301,7 +12301,7 @@ function showAbout() {
Swal.fire({
background: swBg,
position: 'center',
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.6.23',
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.6.24',
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
customClass: { image: 'img-about' },
html: `