mal-dnssearch icon indicating copy to clipboard operation
mal-dnssearch copied to clipboard

geoip support

Open jonschipp opened this issue 9 years ago • 4 comments

jonschipp avatar Jul 20 '15 17:07 jonschipp

Could potentially use https://freegeoip.net/ API.

clinttepe avatar Jul 11 '17 16:07 clinttepe

@NexEng Ah, yes that would be an easy solution.

jonschipp avatar Jul 11 '17 16:07 jonschipp

The above API works, but is quite slow. So far using geoiplookup (geoip-bin dpkg) is the fastest way to achieve country-level lookups. Testing on a web server using real access log data resulted took less than a second per thousand IPs. The freegeoip.net API provided region-level data, but took nearly 100 times longer for the same IP list.

If the geoiplookup solution sounds acceptable, then I will finish out a PR.

clinttepe avatar Jul 21 '17 16:07 clinttepe

@clinttepe Yes, geoiplookup is acceptable. We need to have it backwards compatible though so that if the necessary binary is not installed then it's not used.

jonschipp avatar Jul 21 '17 16:07 jonschipp