ip-index
ip-index copied to clipboard
feat: geolocations
Fetches found geolocations of client.
It is non-breaking change. To use it, pass withGeolocations
- it will return new output to be non-breaking change:
{
"asns": [],
"geolocations": []
}
I put it as draft because it is not efficient enough to do the lookup. I did not have time to think about how to do it more efficiently - my main problem was BigInt and ranges that can overlap for some reason. One approach could be to split overlapping ranges so that the search can be more efficient.
Anyway, maybe this PR can be a source of inspiration.