Skip to content

Commit eb7443c

Browse files
Added support for AIC proxy type for is_proxy field
1 parent d18fee8 commit eb7443c

5 files changed

Lines changed: 12 additions & 9 deletions

File tree

ChangeLog

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
3.5.2 2025-10-31
1+
3.6.1 2026-04-20
2+
* Added support for AIC proxy type for is_proxy field.
3+
4+
3.6.0 2025-10-31
25
* Added checking logic for zip file.
36

47
3.5.2 2025-10-17

IP2Proxy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2002-2024 IP2Location.com
1+
# Copyright (C) 2002-2026 IP2Location.com
22
# All Rights Reserved
33
#
44
# This library is free software: you can redistribute it and/or
@@ -85,7 +85,7 @@ def inet_pton(t, addr):
8585
return out_addr_p.raw
8686
socket.inet_pton = inet_pton
8787

88-
_VERSION = '3.5.1'
88+
_VERSION = '3.6.1'
8989
_NO_IP = 'MISSING IP ADDRESS'
9090
_FIELD_NOT_SUPPORTED = 'NOT SUPPORTED'
9191
_INVALID_IP_ADDRESS = 'INVALID IP ADDRESS'
@@ -175,7 +175,7 @@ def open(self, filename):
175175
self._databasesize = struct.unpack('B', header_row[31:32])[0]
176176

177177
# check if is correct BIN (should be 2 for IP2Proxy BIN file), also checking for zipped file (PK being the first 2 chars)
178-
# only BINs from Jan 2021 onwards have _dbcolumn and _dbtype
178+
# only BINs from Jan 2021 onwards have _productcode
179179
if ((self._productcode != 2 and self._dbyear >= 21) or (self._dbtype == 80 and self._dbcolumn == 75)):
180180
self._f.close()
181181
del self._f
@@ -357,9 +357,9 @@ def get_all(self, ip):
357357
fraud_score = rec.fraud_score
358358
if rec.country_short != _INVALID_IP_ADDRESS:
359359
if self._dbtype == 1:
360-
is_proxy = 0 if (rec.country_short == '-') else ( 2 if ((rec.proxy_type == 'DCH') | (rec.proxy_type == 'SES')) else 1)
360+
is_proxy = 0 if (rec.country_short == '-') else ( 2 if ((rec.proxy_type == 'DCH') | (rec.proxy_type == 'SES') | (rec.proxy_type == 'AIC')) else 1)
361361
else:
362-
is_proxy = 0 if (rec.proxy_type == '-') else ( 2 if ((rec.proxy_type == 'DCH') | (rec.proxy_type == 'SES')) else 1)
362+
is_proxy = 0 if (rec.proxy_type == '-') else ( 2 if ((rec.proxy_type == 'DCH') | (rec.proxy_type == 'SES') | (rec.proxy_type == 'AIC')) else 1)
363363
else:
364364
is_proxy = -1
365365
except:

PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.0
22
Name: IP2Proxy
3-
Version: 3.6.0
3+
Version: 3.6.1
44
Summary: Python API for IP2Proxy database
55
Home-page: http://www.ip2location.com
66
Author: IP2Location

docs/source/code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Retrieve geolocation information for an IP address.
4343
4444
| Field Name | Description |
4545
| ---------------- | ------------------------------------------------------------ |
46-
| is_proxy | 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 |
46+
| is_proxy | 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, search engine IP or AI Crawler IP. |
4747
| country_short | Two-character country code based on ISO 3166. |
4848
| country_long | Country name based on ISO 3166. |
4949
| region | Region or state name. |

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="IP2Proxy",
8-
version="3.6.0",
8+
version="3.6.1",
99
author="IP2Location",
1010
author_email="support@ip2location.com",
1111
description="Python API for IP2Proxy database. It can be used to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.",

0 commit comments

Comments
 (0)