Answer the question
In order to leave comments, you need to log in
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
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
https://habrahabr.ru/post/227183/ + github
https://www.npmjs.com/package/tabgeo
https://www.npmjs.com/package/sypexgeo-vyvid
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 questionAsk a Question
731 491 924 answers to any question