Fix a theoretically possible bug when checking for anonymity

This commit is contained in:
monosans
2022-08-20 23:49:37 +03:00
parent 00d181644b
commit 5869ceefa2
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -2,7 +2,8 @@
## 2022-08-20
- Treat proxy as non-working if status code >= 400
- Treat proxy as non-working if status code >= 400.
- Fix a theoretically possible bug when checking for anonymity.
## 2022-08-08
+4 -1
View File
@@ -54,7 +54,10 @@ class Proxy:
region = data.get("regionName") or "?"
city = data.get("city") or "?"
self.geolocation = f"|{country}|{region}|{city}"
self.is_anonymous = self.ip != data.get("query")
query = data.get("query")
if query:
self.is_anonymous = self.ip != query
def __eq__(self, other: object) -> bool:
if not isinstance(other, Proxy):