Skip to content
forked from etf1/ip2proxy

IP2Location.com Proxy database parser for Golang

License

Notifications You must be signed in to change notification settings

timych/ip2proxy

 
 

Repository files navigation

ip2proxy

IP2Location.com Proxy database parser for Golang

Build Status Go Report Card GoDoc

Install & prerequisites

  • Get the library:
go get -u github.com/etf1/ip2proxy

Use it

package main

import (
	"github.com/etf1/ip2proxy"
)

// let's go !
func main() {
	db, err := ip2proxy.Open("/where/you/unzipped/IP2PROXY-LITE-PX4.BIN")
	if err != nil {
		panic(err)
	}
	res, err := db.LookupIPV4Dot("2.7.154.188")
	if err != nil {
		panic(err)
	}
	if res.Proxy == ip2proxy.ProxyTOR {
		println("2.7.154.188 is a TOR output node !")
	} else {
	    println("2.7.154.188 is NOT a TOR output node")	
	}
}

About

IP2Location.com Proxy database parser for Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 94.8%
  • Makefile 5.2%