Comments (5)
It's probably possible to just rely on something like this
peer_ip = socket.handshake.headers['x-forwarded-for'] || socket.conn.remoteAddress.split(":")[3];
at server side instead of any 3rd-party services on client side. That'll work faster and the app will not depend on other services uptime. I don't see any cases when 3rd-party services will return any other IP than code above will. Except some heavily misconfigured servers.
from mirotalk.
Hey @phpony!
extreme-ip-lookup.com was initially totally free, then it became paid (geoip-lite you mentioned, seems like a great alternative to me and agree with you, that should be handled by server). However I was using it for debugging purposes, and you're right, this data on the server side it's not necessary/used at all. As for api.ipify.org, replacing it with your server-side proposal, seems excellent to me! I removed all unnecessary/unused code
.
Thank you so much!
from mirotalk.
@phpony Now I remember why I used extreme-ip-lookup on the client side :) It was a simple hack to not pay for the API key, as with the key=demo2 using it on the client side, in more cases you get the info, while if you use that key on the server side, no. Try this one: https://extreme-ip-lookup.com/json/?key=demo2
Since I've been asking about that feature in the MiroTalk forum, I was thinking of bringing it back... or using geoip-lite on server side, but got less info compared to extreme. Probably in some use cases for private project, this functionality can be useful to someone for collect statistics, not depend of google analytics and so on. In my case it was just for debugging purposes.
from mirotalk.
Found the alternative: https://www.geojs.io/docs/v1/endpoints/geo/ this works on server side as well.
from mirotalk.
Make it as optional if someone need (default false
), implementation on server side.
# IP lookup
# Using GeoJS to get more info about peer by IP
# Doc: https://www.geojs.io/docs/v1/endpoints/geo/
IP_LOOKUP_ENABLED=false # true or false
from mirotalk.
Related Issues (20)
- Praises and thanks HOT 1
- UI inconsistency: mute audio/video HOT 1
- Annoying share-this-room pop-up each and every time HOT 1
- Stuck at loading page in LAN using. HOT 2
- Allow us to hold a contextualized conversation with ChatGPT HOT 3
- Fix typo in ChatGPT env variables in `.env.template` and `app/src/server.js` HOT 1
- Unable to connect to a room in my notebook HOT 1
- set htaccess HOT 1
- Scalability Issue HOT 1
- Turn server configuration HOT 1
- Can't disable microphone HOT 1
- Screensharing on Mobile devices HOT 1
- Safari Apple or IOS production Domain always give me error "Websocket connection to wss://xxxxxxxx failed: there was a bad response from the server" HOT 1
- BUG: peers can enable each other's camera HOT 1
- On premise : opening a meeting, stuck on a wait screen expecting camera and micro setup ... but nothing to do it HOT 1
- Video is not streaming over the internet when I deployed on my own server HOT 1
- Unable to run mirotalk on local wifi only (offline) HOT 1
- UI suggestions HOT 2
- Use OpenAI's Whisper for the captioning system HOT 1
- Please allow the camera or microphone access to use this app. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirotalk.