ip2location facebbook  ip2location twitter  ip2location google+ ip2location github

IP2Proxy Node.js Module

This Node.js module supports all IP2Proxy™ BIN database products to query proxy IP address and its country, region, city, ISP name and proxy types. It has been optimized for speed and memory utilization.

NPM Repository: https://www.npmjs.com/package/ip2proxy-nodejs GitHub Repository: https://github.com/ip2location/ip2proxy-nodejs

 

Installation
  1. Run npm install ip2proxy-nodejs in your command prompt.

 

Sample Codes
var ip2proxy = require("ip2proxy-nodejs");

ip2proxy.Open("./IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.BIN");

ip = '199.83.103.79';

console.log("GetModuleVersion: " + ip2proxy.getModuleVersion());
console.log("GetPackageVersion: " + ip2proxy.getPackageVersion());
console.log("GetDatabaseVersion: " + ip2proxy.getDatabaseVersion());

// functions for individual fields
console.log("isProxy: " + ip2proxy.isProxy(ip));
console.log("ProxyType: " + ip2proxy.getProxyType(ip));
console.log("CountryShort: " + ip2proxy.getCountryShort(ip));
console.log("CountryLong: " + ip2proxy.getCountryLong(ip));
console.log("Region: " + ip2proxy.getRegion(ip));
console.log("City: " + ip2proxy.getCity(ip));
console.log("ISP: " + ip2proxy.getISP(ip));

// function for all fields
var all = ip2proxy.getAll(ip);
console.log("isProxy: " + all.Is_Proxy);
console.log("ProxyType: " + all.Proxy_Type);
console.log("CountryShort: " + all.Country_Short);
console.log("CountryLong: " + all.Country_Long);
console.log("Region: " + all.Region);
console.log("City: " + all.City);
console.log("ISP: " + all.ISP);

ip2proxy.Close();

 

IP2Proxy LITE BIN Database

Developers may subscribe the free IP2Proxy LITE BIN database for testing and evaluation purpose. Please take note that the LITE database is limited to public proxies (PUB) IP address. Commercial databases consist of other proxy types such as Tor, VPN and etcs.