Skip to content

Commit 5755f53

Browse files
committed
Support new proxy type "AIC" in "isProxy" field
1 parent beec9f1 commit 5755f53

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/source/code.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Retrieve geolocation information for an IP address.
5050
5151
| Field Name | Description |
5252
| ---------------- | ------------------------------------------------------------ |
53-
| isProxy | Determine whether if an IP address was a proxy or not. Returns 0 is not proxy, 1 if proxy, and 2 if it's data center IP |
53+
| isProxy | Determine whether if an IP address was a proxy or not. Returns 0 is not proxy, 1 if proxy, and 2 if it's data center IP or AI crawler |
5454
| countryCode | Two-character country code based on ISO 3166. |
5555
| countryName | Country name based on ISO 3166. |
5656
| regionName | Region or state name. |
@@ -78,7 +78,7 @@ Retrieve geolocation information for an IP address asynchronously.
7878
7979
| Field Name | Description |
8080
| ---------------- | ------------------------------------------------------------ |
81-
| isProxy | Determine whether if an IP address was a proxy or not. Returns 0 is not proxy, 1 if proxy, and 2 if it's data center IP |
81+
| isProxy | Determine whether if an IP address was a proxy or not. Returns 0 is not proxy, 1 if proxy, and 2 if it's data center IP or AI crawler |
8282
| countryCode | Two-character country code based on ISO 3166. |
8383
| countryName | Country name based on ISO 3166. |
8484
| regionName | Region or state name. |

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
# -- Project information
55

66
project = 'IP2Proxy NodeJS'
7-
copyright = '2025, IP2Location'
7+
copyright = '2026, IP2Location'
88
author = 'IP2Location'
99

10-
release = '0.1.0'
11-
version = '0.1.0'
10+
release = '4.5.0'
11+
version = '4.5.0'
1212

1313
# -- General configuration
1414

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ip2proxy-nodejs",
3-
"version": "4.4.0",
3+
"version": "4.5.0",
44
"description": "IP2Proxy proxy detection component",
55
"keywords": [
66
"vpn-detection",

src/ip2proxy.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ export class IP2Proxy {
226226
* Whether IP is a proxy server.
227227
*
228228
* @param myIP The IP address to query.
229-
* @returns -1 if error, 0 if not a proxy, 1 if proxy except DCH and SES, 2 if proxy and DCH or SES
229+
* @returns -1 if error, 0 if not a proxy, 1 if proxy except DCH and SES and AIC, 2 if proxy and DCH or SES or AIC
230230
*/
231231
isProxy(myIP: string): number;
232232
/**
233233
* Whether IP is a proxy server asynchronously.
234234
*
235235
* @param myIP The IP address to query.
236-
* @returns Promise of -1 if error, 0 if not a proxy, 1 if proxy except DCH and SES, 2 if proxy and DCH or SES
236+
* @returns Promise of -1 if error, 0 if not a proxy, 1 if proxy except DCH and SES and AIC, 2 if proxy and DCH or SES or AIC
237237
*/
238238
isProxyAsync(myIP: string): Promise<number>;
239239
/**

src/ip2proxy.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fsp = fs.promises;
44
const https = require("https");
55

66
// For BIN queries
7-
const VERSION = "4.4.0";
7+
const VERSION = "4.5.0";
88
const MAX_INDEX = 65536;
99
const COUNTRY_POSITION = [0, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
1010
const REGION_POSITION = [0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
@@ -834,7 +834,7 @@ class IP2Proxy {
834834
if (data.countryShort == "-" || data.proxyType == "-") {
835835
data.isProxy = 0;
836836
} else {
837-
if (data.proxyType == "DCH" || data.proxyType == "SES") {
837+
if (data.proxyType == "DCH" || data.proxyType == "SES" || data.proxyType == "AIC") {
838838
data.isProxy = 2;
839839
} else {
840840
data.isProxy = 1;
@@ -1070,7 +1070,7 @@ class IP2Proxy {
10701070
if (data.countryShort == "-" || data.proxyType == "-") {
10711071
data.isProxy = 0;
10721072
} else {
1073-
if (data.proxyType == "DCH" || data.proxyType == "SES") {
1073+
if (data.proxyType == "DCH" || data.proxyType == "SES" || data.proxyType == "AIC") {
10741074
data.isProxy = 2;
10751075
} else {
10761076
data.isProxy = 1;
@@ -1212,8 +1212,8 @@ class IP2Proxy {
12121212
isProxy(myIP) {
12131213
// -1 is error
12141214
// 0 is not a proxy
1215-
// 1 is proxy except DCH and SES
1216-
// 2 is proxy and DCH or SES
1215+
// 1 is proxy except DCH and SES and AIC
1216+
// 2 is proxy and DCH or SES or AIC
12171217
let data = this.proxyQuery(myIP, MODES.IS_PROXY);
12181218
return data.isProxy;
12191219
}
@@ -1222,8 +1222,8 @@ class IP2Proxy {
12221222
async isProxyAsync(myIP) {
12231223
// -1 is error
12241224
// 0 is not a proxy
1225-
// 1 is proxy except DCH and SES
1226-
// 2 is proxy and DCH or SES
1225+
// 1 is proxy except DCH and SES and AIC
1226+
// 2 is proxy and DCH or SES or AIC
12271227
let data = await this.proxyQueryAsync(myIP, MODES.IS_PROXY);
12281228
return data.isProxy;
12291229
}

0 commit comments

Comments
 (0)