notatallshaw / fall_guys_ping_estimate

MIT License
41 stars 6 forks source link

Investigate using IP API to automate some of the IP lookup #49

Open notatallshaw opened 2 years ago

notatallshaw commented 2 years ago

Actually the ToS look good for ip-api, I will need to test querying a realistic amount of IP addresses and see if it balks in practice (so 20 per hour for a whole day) and also check the accuracy.

If it still looks good I would still want to:

  1. Distribute a file of cached IP address results to reduce the amount of times IP API is queried
  2. Still display the Fall Guys region. But I could do this with a more coarse mapping such as "New York -> US East".
  3. Anything else?

_Originally posted by @notatallshaw in https://github.com/notatallshaw/fall_guys_ping_estimate/issues/44#issuecomment-992778651_

notatallshaw commented 2 years ago

Found at least 1 mistake in their API: https://ip-api.com/#107.150.147.9

Says it is in San Jose but actually is in NY, only IP Info seems to get this correct: https://ipinfo.io/

Will keep investigating. Maybe we can keep a shorter override list? Or can use distributed DB to do this?

notatallshaw commented 2 years ago

I reported the above to their "contacts us", let's see if I get a response.

In the mean time I've found another example where they are incorrect. The accuracy is pretty good, but it's definitely not 100%, I have some ideas on how to handle this.

notatallshaw commented 2 years ago

They are fixing it!

notatallshaw commented 2 years ago

I have a working version of this now, but.... I am finding the data to be very inaccurate, especially for US East. On the other hand my database is also very inaccurate, it seems if you are not updating regularly your data will slowly become incorrect.

My current idea is to give the user a settings menu that lets them select what data they want to see and it will be clear what data is coming from IP API and what data is not. I have started implementing this.