ip-index icon indicating copy to clipboard operation
ip-index copied to clipboard

feat: geolocations

Open mieszko4 opened this issue 7 months ago • 0 comments

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.

mieszko4 avatar Nov 24 '23 10:11 mieszko4