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
Copy file name to clipboardExpand all lines: README.md
+5-184Lines changed: 5 additions & 184 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,195 +3,14 @@
3
3
4
4
# IP2Proxy Node.js Module
5
5
6
-
This module 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
6
+
This module 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), residential proxies (RES), consumer privacy networks (CPN), and enterprise private networks (EPN). It lookup the proxy IP address from **IP2Proxy BIN Data** file. This data file can be downloaded at
7
7
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:
11
+
# Developer Documentation
12
+
To learn more about installation, usage, and code examples, please visit the developer documentation at [https://ip2proxy-nodejs.readthedocs.io/en/latest/index.html.](https://ip2proxy-nodejs.readthedocs.io/en/latest/index.html)
12
13
13
-
https://www.ip2location.com/web-service/ip2proxy
14
-
15
-
## Installation
16
-
17
-
To install this module type the following:
18
-
19
-
```bash
20
-
21
-
npm install ip2proxy-nodejs
22
-
23
-
```
24
-
25
-
## QUERY USING THE BIN FILE
26
-
27
-
## Methods
28
-
Below are the methods supported in this class.
29
-
30
-
|Method Name|Description|
31
-
|---|---|
32
-
|open|Open the IP2Proxy BIN data for lookup.|
33
-
|openAsync|Open the IP2Proxy BIN data for lookup asynchronously.|
34
-
|close|Close and clean up the file pointer.|
35
-
|getPackageVersion|Get the package version (1 to 11 for PX1 to PX11 respectively).|
36
-
|getModuleVersion|Get the module version.|
37
-
|getDatabaseVersion|Get the database version.|
38
-
|isProxy|Check whether if an IP address was a proxy. Returned value:<ul><li>-1 : errors</li><li>0 : not a proxy</li><li>1 : a proxy</li><li>2 : a data center IP address or search engine robot</li></ul>|
39
-
|isProxyAsync|Check whether if an IP address was a proxy asynchronously. Returned value:<ul><li>-1 : errors</li><li>0 : not a proxy</li><li>1 : a proxy</li><li>2 : a data center IP address or search engine robot</li></ul>|
40
-
|getAll|Return the proxy information in an object.|
41
-
|getAllAsync|Return the proxy information in an object asynchronously.|
42
-
|getProxyType|Return the proxy type. Please visit <ahref="https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential"target="_blank">IP2Location</a> for the list of proxy types supported|
43
-
|getProxyTypeAsync|Return the proxy type asynchronously. Please visit <ahref="https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential"target="_blank">IP2Location</a> for the list of proxy types supported|
44
-
|getCountryShort|Return the ISO3166-1 country code (2-digits) of the proxy.|
45
-
|getCountryShortAsync|Return the ISO3166-1 country code (2-digits) of the proxy asynchronously.|
46
-
|getCountryLong|Return the ISO3166-1 country name of the proxy.|
47
-
|getCountryLongAsync|Return the ISO3166-1 country name of the proxy asynchronously.|
48
-
|getRegion|Return the ISO3166-2 region name of the proxy. Please visit <ahref="https://www.ip2location.com/free/iso3166-2"target="_blank">ISO3166-2 Subdivision Code</a> for the information of ISO3166-2 supported|
49
-
|getRegionAsync|Return the ISO3166-2 region name of the proxy asynchronously. Please visit <ahref="https://www.ip2location.com/free/iso3166-2"target="_blank">ISO3166-2 Subdivision Code</a> for the information of ISO3166-2 supported|
50
-
|getCity|Return the city name of the proxy.|
51
-
|getCityAsync|Return the city name of the proxy asynchronously.|
52
-
|getISP|Return the ISP name of the proxy.|
53
-
|getISPAsync|Return the ISP name of the proxy asynchronously.|
54
-
|getDomain|Return the domain name of the proxy.|
55
-
|getDomainAsync|Return the domain name of the proxy asynchronously.|
56
-
|getUsageType|Return the usage type classification of the proxy. Please visit <ahref="https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential"target="_blank">IP2Location</a> for the list of usage types supported.|
57
-
|getUsageTypeAsync|Return the usage type classification of the proxy asynchronously. Please visit <ahref="https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential"target="_blank">IP2Location</a> for the list of usage types supported.|
58
-
|getASN|Return the autonomous system number of the proxy.|
59
-
|getASNAsync|Return the autonomous system number of the proxy asynchronously.|
60
-
|getAS|Return the autonomous system name of the proxy.|
61
-
|getASAsync|Return the autonomous system name of the proxy asynchronously.|
62
-
|getLastSeen|Return the number of days that the proxy was last seen.|
63
-
|getLastSeenAsync|Return the number of days that the proxy was last seen asynchronously.|
64
-
|getThreat|Return the threat type of the proxy.|
65
-
|getThreatAsync|Return the threat type of the proxy asynchronously.|
66
-
|getProvider|Return the provider of the proxy.|
67
-
|getProviderAsync|Return the provider of the proxy asynchronously.|
68
-
69
-
## Usage
70
-
71
-
```javascript
72
-
const {IP2Proxy} =require("ip2proxy-nodejs");
73
-
74
-
let ip2proxy =newIP2Proxy();
75
-
76
-
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
158
-
159
-
## Methods
160
-
Below are the methods supported in this class.
161
-
162
-
|Method Name|Description|
163
-
|---|---|
164
-
|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> |
165
-
|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>|
166
-
|getCredit(callback)|This method returns the web service credit balance in an object.|
Copy file name to clipboardExpand all lines: docs/source/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
# IP2Proxy Node.js Module
5
5
6
-
This module 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
6
+
This module 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), residential proxies (RES), consumer privacy networks (CPN), and enterprise private networks (EPN). It lookup the proxy IP address from **IP2Proxy BIN Data** file. This data file can be downloaded at
7
7
8
8
* Free IP2Proxy BIN Data: https://lite.ip2location.com
9
9
* Commercial IP2Proxy BIN Data: https://www.ip2location.com/database/ip2proxy
0 commit comments