CyferShepard / Jellystat

Jellystat is a free and open source Statistics App for Jellyfin
MIT License
1.09k stars 33 forks source link

Show IP address on a map #117

Closed dt2i closed 8 months ago

dt2i commented 1 year ago

It might be an interesting feature to have a map that shows the locations for the ip addresses users are logging in from.

DaftFuzz commented 1 year ago

https://dev.maxmind.com/geoip/geolite2-free-geolocation-data allows 1000 requests per day to their API with a key, that's a pretty reasonable limit, plus I guess it could be an option to pass through your own keys via environment variables?

Their response looks like this: https://dev.maxmind.com/geoip/docs/web-services/responses#geoip2-city-body-example (the free API is less accurate, though)

I'm currently having a play at using this for something similar on a fork (specifically, being able to ad-hoc click the IP of a given session to show geodata for it), but it could easily be extended to build a map with the result coordinates 🤔

What do you think?

CyferShepard commented 1 year ago

Hey @DaftFuzz , thanks for looking into this, i had looked into it once before but couldn't really find an api with a decent quantity of free requests. il look into using this one aswell as what other ones are available

hadim commented 4 months ago

In case it can help, I found a free geoip API: https://ip-api.com/

The limit is 45 requests per minute.