• Your shopping cart is empty!

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 VPN anonymizer, open proxies, web proxies, Tor exits, data center, web hosting (DCH) range, search engine robots (SES) and residential proxy (RES). It has been optimized for speed and memory utilization.

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

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

func main() {
	db, err := ip2proxy.OpenDB("./IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL.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", 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 IPv4 + IPv6
IP2Proxy PX1 Sample BIN File Download (25.96 MB)
IP2Proxy PX2 Sample BIN File Download (28.64 MB)
IP2Proxy PX3 Sample BIN File Download (34.31 MB)
IP2Proxy PX4 Sample BIN File Download (41.91 MB)
IP2Proxy PX5 Sample BIN File Download (44.09 MB)
IP2Proxy PX6 Sample BIN File Download (44.96 MB)
IP2Proxy PX7 Sample BIN File Download (47.95 MB)
IP2Proxy PX8 Sample BIN File Download (49.21 MB)
IP2Proxy PX9 Sample BIN File Download (49.60 MB)
IP2Proxy PX10 Sample BIN File Download (55.37 MB)