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)
- Almost over 9000 HOT 2
- not working HOT 1
- No Host in meeting! HOT 6
- Local SVG avatars instead of external service HOT 4
- discord Inviting link expired HOT 1
- Unable to Grant Camera or Microphone Access in the App; Loading Error HOT 3
- Deploying to railway HOT 1
- Document Picture-in-Picture HOT 4
- Grammatical error HOT 4
- Audio very low HOT 1
- Simaltaneous Video and Screensharing HOT 2
- Should login pages use Post Method Request rather than Get Method Request? HOT 1
- socket error on nginx proxy HOT 3
- Can you support modifying chatgpt base_ URL, supporting chatgpt for proxy openai HOT 1
- recognition rate issue HOT 1
- "Not a directory" error mounting .env folder in docker HOT 1
- [Bug]: Needs a round borders to image HOT 2
- [FEAT]: Custom Sroll Bar HOT 2
- Not able to receive file when someone send a file using Send-File HOT 1
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.