C Library
PHP Module
Perl Module
Ruby Library
Python Library
.NET Component
Java Component
Apache Module
Nginx Module
Node.js Module
HTTP Module
Go Package
D Library
Lua Package
OpenResty Package
Splunk Add-on
Erlang Module
Haskell Package
Kotlin Module
Scala Library
Apache Kafka Transform
Deno Module
R Package
IP2Proxy Scala Library
This library is the Scala programming language library 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.
object IP2ProxyTest {
def main(args: Array[String]): Unit = {
try {
val Proxy = new IP2Proxy
var All: ProxyResult = null
var IsProxy: Int = 0
var ProxyType: String = null
var CountryShort: String = null
var CountryLong: String = null
var Region: String = null
var City: String = null
var ISP: String = null
var Domain: String = null
var UsageType: String = null
var ASN: String = null
var AS: String = null
var LastSeen: String = null
var Threat: String = null
var Provider: String = null
val IP = "221.121.146.0"
if (Proxy.Open("./IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL-PROVIDER.BIN", IP2Proxy.IOModes.IP2PROXY_MEMORY_MAPPED) == 0) {
System.out.println("GetModuleVersion: " + Proxy.GetModuleVersion)
System.out.println("GetPackageVersion: " + Proxy.GetPackageVersion)
System.out.println("GetDatabaseVersion: " + Proxy.GetDatabaseVersion)
// reading all available fields
All = Proxy.GetAll(IP)
System.out.println("Is_Proxy: " + String.valueOf(All.Is_Proxy))
System.out.println("Proxy_Type: " + All.Proxy_Type)
System.out.println("Country_Short: " + All.Country_Short)
System.out.println("Country_Long: " + All.Country_Long)
System.out.println("Region: " + All.Region)
System.out.println("City: " + All.City)
System.out.println("ISP: " + All.ISP)
System.out.println("Domain: " + All.Domain)
System.out.println("Usage_Type: " + All.Usage_Type)
System.out.println("ASN: " + All.ASN)
System.out.println("AS: " + All.AS)
System.out.println("Last_Seen: " + All.Last_Seen)
System.out.println("Threat: " + All.Threat)
System.out.println("Provider: " + All.Provider)
// reading individual fields
IsProxy = Proxy.IsProxy(IP)
System.out.println("Is_Proxy: " + String.valueOf(IsProxy))
ProxyType = Proxy.GetProxyType(IP)
System.out.println("Proxy_Type: " + ProxyType)
CountryShort = Proxy.GetCountryShort(IP)
System.out.println("Country_Short: " + CountryShort)
CountryLong = Proxy.GetCountryLong(IP)
System.out.println("Country_Long: " + CountryLong)
Region = Proxy.GetRegion(IP)
System.out.println("Region: " + Region)
City = Proxy.GetCity(IP)
System.out.println("City: " + City)
ISP = Proxy.GetISP(IP)
System.out.println("ISP: " + ISP)
Domain = Proxy.GetDomain(IP)
System.out.println("Domain: " + Domain)
UsageType = Proxy.GetUsageType(IP)
System.out.println("UsageType: " + UsageType)
ASN = Proxy.GetASN(IP)
System.out.println("ASN: " + ASN)
AS = Proxy.GetAS(IP)
System.out.println("AS: " + AS)
LastSeen = Proxy.GetLastSeen(IP)
System.out.println("LastSeen: " + LastSeen)
Threat = Proxy.GetThreat(IP)
System.out.println("Threat: " + Threat)
Provider = Proxy.GetProvider(IP)
System.out.println("Provider: " + Provider)
}
else System.out.println("Error reading BIN file.")
Proxy.Close
} catch {
case ex: Exception =>
System.out.println(ex)
}
}
}
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) |
Discover Your User Locations
Retrieve geolocation data for FREE now!