V
V
Vladimir Mukovoz2017-09-15 23:28:47
bash
Vladimir Mukovoz, 2017-09-15 23:28:47

How to determine which country ip is from using local library?

Some introductory information
There is a large pack of ip in the file (100mb - 1gb), so it is not an option to find out ip through a request to third-party sites. Implemented the definition of ip and the scattering of country files on bash, now I decided to do it in the web interface.

Question: is there a package on nodejs to determine from which country ip with local library? Or is it better to pass a file from ip to a bash script so that it does the job and transfers the files back to NodeJS?

I’ll add an addition, write the answer to those who really used it, I know how to use Google, I’m also able to draw logical conclusions. No offense...

PS Of course, I would like to do it completely in NodeJS, so as not to depend on the OS.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2017-09-16
@castomi

https://dev.maxmind.com/geoip/geoip2/geolite2/
https://dev.maxmind.com/geoip/geoip2/downloadable/
bash or node - it's up to the developer and his skills

D
Dimonchik, 2017-09-15
@dimonchik2013

https://habrahabr.ru/post/227183/ + github
https://www.npmjs.com/package/tabgeo
https://www.npmjs.com/package/sypexgeo-vyvid

V
Vladislav Polyakov, 2017-09-15
@polRk

All ip addresses have the first 2 numbers 111 . 111.111.111 - are an indicator of the country, providers often indicate the country in whois, here, you can write a module, and fill in the range of these numbers and compare with countries. Create some dictionary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question