You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,6 +8,9 @@ This module allows user to query an IP address if it was being used as VPN anony
8
8
* Free IP2Proxy BIN Data: https://lite.ip2location.com
9
9
* Commercial IP2Proxy BIN Data: https://www.ip2location.com/database/ip2proxy
10
10
11
+
As an alternative, this module 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:
12
+
13
+
https://www.ip2location.com/web-service/ip2proxy
11
14
12
15
## Installation
13
16
@@ -19,13 +22,15 @@ npm install ip2proxy-nodejs
19
22
20
23
```
21
24
25
+
## QUERY USING THE BIN FILE
26
+
22
27
## Methods
23
28
Below are the methods supported in this class.
24
29
25
30
|Method Name|Description|
26
31
|---|---|
27
-
|Open|Open the IP2Proxy BIN data for lookup.|
28
-
|Close|Close and clean up the file pointer.|
32
+
|open|Open the IP2Proxy BIN data for lookup.|
33
+
|close|Close and clean up the file pointer.|
29
34
|getPackageVersion|Get the package version (1 to 11 for PX1 to PX11 respectively).|
30
35
|getModuleVersion|Get the module version.|
31
36
|getDatabaseVersion|Get the database version.|
@@ -48,10 +53,11 @@ Below are the methods supported in this class.
48
53
## Usage
49
54
50
55
```javascript
56
+
const {IP2Proxy} =require("ip2proxy-nodejs");
51
57
52
-
var ip2proxy =require("ip2proxy-nodejs");
58
+
let ip2proxy =newIP2Proxy();
53
59
54
-
if (ip2proxy.Open("./IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL-PROVIDER.BIN") ==0) {
60
+
if (ip2proxy.open("./IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL-PROVIDER.BIN") ==0) {
## QUERY USING THE IP2PROXY PROXY DETECTION WEB SERVICE
108
+
109
+
## Methods
110
+
Below are the methods supported in this class.
111
+
112
+
|Method Name|Description|
113
+
|---|---|
114
+
|open(apiKey, apiPackage, useSSL = true)| Expects 2 or 3 input parameters:<ol><li>IP2Proxy API Key.</li><li>Package (PX1 - PX11)</li></li><li>Use HTTPS or HTTP</li></ol> |
115
+
|lookup(myIP, callback)|Query IP address. This method returns an object containing the proxy info. <ul><li>countryCode</li><li>countryName</li><li>regionName</li><li>cityName</li><li>isp</li><li>domain</li><li>usageType</li><li>asn</li><li>as</li><li>lastSeen</li><li>threat</li><li>proxyType</li><li>isProxy</li><li>provider</li><ul>|
116
+
|getCredit()|This method returns the web service credit balance in an object.|
0 commit comments