IP2Proxy C Library

This C module supports all IP2Proxy™ BIN database products for querying proxy IP addresses and retrieving information such as proxy type, country, region, city, ISP name, domain name, usage type, ASN, last seen in days, and threats. The detected proxy types include virtual private networks (VPN), open proxies, web proxies, Tor exits, data center & web hosting ranges (DCH), search engine robots (SES), residential proxies (RES), consumer privacy networks (CPN), and enterprise private networks (EPN). This C module has been optimized for speed and memory utilization.

Installation
Unix/Linux
  1. Decompress the archive.
  2. Navigate to working directory.
    cd ip2proxy-c-master
  3. Run the following commands:
    autoreconf -i -v --force
    ./configure
    make
    make install
  4. To test it, go to test folder.
    cd test
  5. And run the sample application
    test-IP2Proxy


Windows
  1. Decompress the archive.
  2. Open command prompt and navigate to Microsoft Visual Studio Visual C directory and execute vcvarsall.bat or vcvars32.bat. (Alternatively, open Visual Studio Command Prompt located in the start menu under Microsoft Visual Studio\Visual Studio Tools)
  3. Navigate to working directory.
    cd ip2proxy-c-master
  4. Run the following commands:
    nmake Makefile.win
  5. To test it, go to test folder.
    cd test
  6. And run the sample application
    test-IP2Proxy


MacOS
  1. Decompress the archive.
  2. Navigate to working directory.
    cd ip2proxy-c-master
  3. Run the following commands:
    autoreconf -i -v --force
    export CFLAGS=-I/usr/include/malloc
    ./configure
    make
    make install
  4. To test it, go to test folder.
    cd test
  5. And run the sample application
    test-IP2Proxy
Sample Codes
#include "IP2Proxy.h"

IP2Proxy *IP2ProxyObj = IP2Proxy_open("../data/SAMPLE.BIN");
IP2ProxyRecord *record = IP2Proxy_get_all(IP2ProxyObj, "161.11.12.13");
printf("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
	record->country_short,
	record->country_long,
	record->region,
	record->city,
	record->isp,
	record->is_proxy;
	record->proxy_type,
	record->domain,
	record->usage_type,
	record->asn,
	record->as_,
	record->last_seen,
	record->threat,
	record->provider);
IP2Proxy_free_record(record);
IP2Proxy_close(IP2ProxyObj);
CLI

Query an IP address and display the result.

ip2proxy -d [IP2PROXY BIN DATA PATH] --ip [IP ADDRESS]

Query all IP addresses from an input file and display the result.

ip2proxy -d [IP2PROXY BIN DATA PATH] -i [INPUT FILE PATH]

Query all IP addresses from an input file and display the result in XML format.

ip2proxy -d [IP2PROXY BIN DATA PATH] -i [INPUT FILE PATH] --format XML
Sample IP2Proxy Databases (BIN)
Sample Packages - BIN File IPv4 + IPv6
IP2Proxy PX1 Download (20.69 MB)
IP2Proxy PX2 Download (23.17 MB)
IP2Proxy PX3 Download (27.55 MB)
IP2Proxy PX4 Download (32.29 MB)
IP2Proxy PX5 Download (33.72 MB)
IP2Proxy PX6 Download (34.01 MB)
IP2Proxy PX7 Download (36.69 MB)
IP2Proxy PX8 Download (37.84 MB)
IP2Proxy PX9 Download (37.69 MB)
IP2Proxy PX10 Download (45.43 MB)
IP2Proxy PX11 Download (46.34 MB)
Pop Up Box

Discover Your User Locations

Retrieve geolocation data for FREE now!