diff --git a/CHANGELOG.md b/CHANGELOG.md index d3b0bd9..c6505c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/main.py b/main.py index 679c57f..0ddcfdd 100755 --- a/main.py +++ b/main.py @@ -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):