All Projects → ip2location → ip2proxy-go

ip2location / ip2proxy-go

Licence: MIT license
IP2Proxy Go package allows users to query an IP address to determine if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to ip2proxy-go

ip2proxy-php
PHP module for IP2Proxy database lookup. It allows user to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.
Stars: ✭ 49 (+308.33%)
Mutual labels:  proxy-checker, ip2proxy, ip2proxy-database
ip2proxy-java
IP2Proxy Java Component.It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and Tor exits.
Stars: ✭ 16 (+33.33%)
Mutual labels:  ip2proxy, ip2proxy-database
proxy-checker
The simple script, which checks good and bad proxies
Stars: ✭ 42 (+250%)
Mutual labels:  proxy-checker
WordPress-IP-Geo-Block
A WordPress plugin that will blocks any comment, pingback and trackback spams posted from outside your nation. And it will also protect against malicious access to the login form, admin area and XML-RPC from undesired countries.
Stars: ✭ 26 (+116.67%)
Mutual labels:  ip2location
ip2location-cakephp
IP2Location CakePHP plugin enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, IP address type and IAB advertising category from IP address using IP2Location database.
Stars: ✭ 17 (+41.67%)
Mutual labels:  ip2location
ip2location-lua
Use IP2Location geolocation database to lookup the geolocation information with IP2Location Lua Package. It can be used to determine country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address …
Stars: ✭ 14 (+16.67%)
Mutual labels:  ip2location
IP2Country
Ip to country mapping
Stars: ✭ 39 (+225%)
Mutual labels:  ip2location
Hacking-tools
INSTAGRAM DM BOT | MULTI-THREADING REQUESTS BASED | PROXY SUPPORT
Stars: ✭ 35 (+191.67%)
Mutual labels:  proxy-checker
ipinfodb-php
PHP library to query free IPInfoDB API service.
Stars: ✭ 15 (+25%)
Mutual labels:  ip2location
ip2location-iata-icao
This list contains the airport codes of IATA airport code and ICAO airport code together with country code and region name supported in IP2Location geolocation database.
Stars: ✭ 39 (+225%)
Mutual labels:  ip2location
jqIpLocation
jqIpLocation – jQuery Plugin that returns the location of an IP address in JSON format
Stars: ✭ 18 (+50%)
Mutual labels:  ip2location
IP2Location-C-Library
IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.
Stars: ✭ 37 (+208.33%)
Mutual labels:  ip2location
ip2location-csv-converter
This PHP script converts IP2Location CSV database into IP range or CIDR format.
Stars: ✭ 26 (+116.67%)
Mutual labels:  ip2location
ip-location-db
ip to location database by ASN, GeoFeed, Whois, iptoasn.com, db-ip lite, GeoLite2
Stars: ✭ 160 (+1233.33%)
Mutual labels:  ip2location
Proxybroker
Proxy [Finder | Checker | Server]. HTTP(S) & SOCKS 🎭
Stars: ✭ 2,767 (+22958.33%)
Mutual labels:  proxy-checker
Hamster
🐀 A Bot toolkit for github that supports OAuth, Events, API, Custom Commands and Check Runs.
Stars: ✭ 40 (+233.33%)
Mutual labels:  go-lang
proxy checker
A checker designed in Python 3 for checking proxy.
Stars: ✭ 37 (+208.33%)
Mutual labels:  proxy-checker
IP2Location-PHP-Module
This module is a PHP module that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, mobile, usage types, address type, IAB category, etc that any IP address or host name originates from.
Stars: ✭ 154 (+1183.33%)
Mutual labels:  ip2location
ip2location-nginx
Nginx module that allows user to lookup for geolocation information using IP2Location database.
Stars: ✭ 33 (+175%)
Mutual labels:  ip2location
ip2location-piwik
Use IP2Location geolocation database to lookup for accurate visitor location in Matomo (Piwik) 3.x. It enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address o…
Stars: ✭ 26 (+116.67%)
Mutual labels:  ip2location

Go Report Card PkgGoDev

IP2Proxy Go Package

This package allows user to query an IP address if it was being used as VPN anonymizer, open proxies, web proxies, Tor exits, data center, web hosting (DCH) range, search engine robots (SES) and residential (RES). It lookup the proxy IP address from IP2Proxy BIN Data file. This data file can be downloaded at

As an alternative, this package can also call the IP2Proxy Web Service. This requires an API key. If you don't have an existing API key, you can subscribe for one at the below:

https://www.ip2location.com/web-service/ip2proxy

Installation

To install this module type the following:

go get github.com/ip2location/ip2proxy-go/v3

QUERY USING THE BIN FILE

Methods

Below are the methods supported in this package.

Method Name Description
OpenDB Open the IP2Proxy BIN data for lookup.
Close Close and clean up the file pointer.
PackageVersion Get the package version (1 to 11 for PX1 to PX11 respectively).
ModuleVersion Get the module version.
DatabaseVersion Get the database version.
IsProxy Check whether if an IP address was a proxy. Returned value:
  • -1 : errors
  • 0 : not a proxy
  • 1 : a proxy
  • 2 : a data center IP address or search engine robot
GetAll Return the proxy information in an array.
GetProxyType Return the proxy type. Please visit IP2Location for the list of proxy types supported.
GetCountryShort Return the ISO3166-1 country code (2-digits) of the proxy.
GetCountryLong Return the ISO3166-1 country name of the proxy.
GetRegion Return the ISO3166-2 region name of the proxy. Please visit ISO3166-2 Subdivision Code for the information of ISO3166-2 supported.
GetCity Return the city name of the proxy.
GetIsp Return the ISP name of the proxy.
GetDomain Return the domain name of the proxy.
GetUsageType Return the usage type classification of the proxy. Please visit IP2Location for the list of usage types supported.
GetAsn Return the autonomous system number of the proxy.
GetAs Return the autonomous system name of the proxy.
GetLastSeen Return the number of days that the proxy was last seen.
GetThreat Return the threat type of the proxy.
GetProvider Return the provider of the proxy.

Usage

package main

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

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", 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"])
	fmt.Printf("Provider: %s\n", all["Provider"])
	
	db.Close()
}

QUERY USING THE IP2PROXY PROXY DETECTION WEB SERVICE

Methods

Below are the methods supported in this class.

Method Name Description
OpenWS(apikey string, apipackage string, usessl bool) Expects 3 input parameters:
  1. IP2Proxy API Key.
  2. Package (PX1 - PX11)
  3. Use HTTPS or HTTP
LookUp(ipAddress string) Query IP address. This method returns a struct containing the proxy info.
  • CountryCode
  • CountryName
  • RegionName
  • CityName
  • ISP
  • Domain
  • UsageType
  • ASN
  • AS
  • LastSeen
  • Threat
  • ProxyType
  • IsProxy
  • Provider
    GetCredit() This method returns the web service credit balance in a struct.
    package main
    
    import (
    	"fmt"
    	"github.com/ip2location/ip2proxy-go/v3"
    )
    
    func main() {
    	apikey := "YOUR_API_KEY"
    	apipackage := "PX11"
    	usessl := true
    
    	ws, err := ip2proxy.OpenWS(apikey, apipackage, usessl)
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    	ip := "8.8.8.8"
    	res, err := ws.LookUp(ip)
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    
    	if res.Response != "OK" {
    		fmt.Printf("Error: %s\n", res.Response)
    	} else {
    		fmt.Printf("IsProxy: %s\n", res.IsProxy)
    		fmt.Printf("ProxyType: %s\n", res.ProxyType)
    		fmt.Printf("CountryCode: %s\n", res.CountryCode)
    		fmt.Printf("CountryName: %s\n", res.CountryName)
    		fmt.Printf("RegionName: %s\n", res.RegionName)
    		fmt.Printf("CityName: %s\n", res.CityName)
    		fmt.Printf("ISP: %s\n", res.ISP)
    		fmt.Printf("Domain: %s\n", res.Domain)
    		fmt.Printf("UsageType: %s\n", res.UsageType)
    		fmt.Printf("ASN: %s\n", res.ASN)
    		fmt.Printf("AS: %s\n", res.AS)
    		fmt.Printf("LastSeen: %s\n", res.LastSeen)
    		fmt.Printf("Threat: %s\n", res.Threat)
    		fmt.Printf("Provider: %s\n", res.Provider)
    	}
    
    	res2, err := ws.GetCredit()
    
    	if err != nil {
    		fmt.Print(err)
    		return
    	}
    	
    	fmt.Printf("Credit Balance: %s\n", res2.Response)
    }
    Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].