IP2Proxy Go Package

This package is the Go programming language package to support all IP2Proxy™ BIN database products to query an IP address if it is being used as 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). It has been optimized for speed and memory utilization.

Installation
go get github.com/ip2location/ip2proxy-go/v4
Sample Codes
package main

import (
	"fmt"
	"strconv"
	"github.com/ip2location/ip2proxy-go/v4"
)

func main() {
	db, err := ip2proxy.OpenDB("./IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL-PROVIDER.BIN")
	
	if err != nil {
		return
	}
	ip := "199.83.103.79"
	all, err := db.GetAll(ip)
	
	if err != nil {
		fmt.Print(err)
		return
	}
	
	fmt.Printf("ModuleVersion: %s\n", ip2proxy.ModuleVersion())
	fmt.Printf("PackageVersion: %s\n", db.PackageVersion())
	fmt.Printf("DatabaseVersion: %s\n", db.DatabaseVersion())
	
	fmt.Printf("IsProxy: %s\n", strconv.Itoa(int(all.IsProxy)));
	fmt.Printf("ProxyType: %s\n", all.ProxyType);
	fmt.Printf("CountryShort: %s\n", all.CountryShort);
	fmt.Printf("CountryLong: %s\n", all.CountryLong);
	fmt.Printf("Region: %s\n", all.Region);
	fmt.Printf("City: %s\n", all.City);
	fmt.Printf("Isp: %s\n", all.Isp);
	fmt.Printf("Domain: %s\n", all.Domain);
	fmt.Printf("UsageType: %s\n", all.UsageType);
	fmt.Printf("Asn: %s\n", all.Asn);
	fmt.Printf("As: %s\n", all.As);
	fmt.Printf("LastSeen: %s\n", all.LastSeen);
	fmt.Printf("Threat: %s\n", all.Threat);
	
	db.Close()
}
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!