Skip to content

Commit 70cb4f7

Browse files
committed
Upgrade to geoip2 with is_residential_proxy
1 parent 9ebf68f commit 70cb4f7

6 files changed

Lines changed: 14 additions & 1 deletion

File tree

HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
History
44
-------
55

6+
2.1.0
7+
++++++++++++++++++
8+
9+
* Added ``response.ip_address.traits.is_residential_proxy`` to the
10+
minFraud Insights and Factors models. This indicates whether the IP
11+
address is on a suspected anonymizing network and belongs to a
12+
residential ISP.
13+
614
2.0.3 (2020-07-28)
715
++++++++++++++++++
816

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
requirements = [
2020
"aiohttp>=3.6.2,<4.0.0",
2121
"email_validator>=1.1.1,<2.0.0",
22-
"geoip2>=4.0.0,<5.0.0",
22+
"geoip2>=4.1.0,<5.0.0",
2323
"requests>=2.24.0,<3.0.0",
2424
"urllib3>=1.25.2,<2.0.0",
2525
"voluptuous",

tests/data/factors-response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"is_anonymous_vpn": true,
9595
"is_hosting_provider": true,
9696
"is_public_proxy": true,
97+
"is_residential_proxy": true,
9798
"is_satellite_provider": true,
9899
"is_tor_exit_node": true,
99100
"isp": "Andrews & Arnold Ltd",

tests/data/insights-response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"is_anonymous_vpn": true,
9595
"is_hosting_provider": true,
9696
"is_public_proxy": true,
97+
"is_residential_proxy": true,
9798
"is_satellite_provider": true,
9899
"is_tor_exit_node": true,
99100
"isp": "Andrews & Arnold Ltd",

tests/test_models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def test_ip_address(self):
160160
"is_anonymous_vpn": True,
161161
"is_hosting_provider": True,
162162
"is_public_proxy": True,
163+
"is_residential_proxy": True,
163164
"is_satellite_provider": True,
164165
"is_tor_exit_node": True,
165166
},
@@ -175,6 +176,7 @@ def test_ip_address(self):
175176
self.assertEqual(True, address.traits.is_anonymous_vpn)
176177
self.assertEqual(True, address.traits.is_hosting_provider)
177178
self.assertEqual(True, address.traits.is_public_proxy)
179+
self.assertEqual(True, address.traits.is_residential_proxy)
178180
self.assertEqual(True, address.traits.is_satellite_provider)
179181
self.assertEqual(True, address.traits.is_tor_exit_node)
180182
self.assertEqual(True, address.country.is_high_risk)

tests/test_webservice.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def test_200(self):
195195
self.assertEqual(self.cls(response), model)
196196
if self.has_ip_location():
197197
self.assertEqual("United Kingdom", model.ip_address.country.name)
198+
self.assertEqual(True, model.ip_address.traits.is_residential_proxy)
198199

199200
@httprettified
200201
def test_200_on_request_with_nones(self):

0 commit comments

Comments
 (0)