fix(proxies): Fixes WindscribeVPN server authentication

This commit is contained in:
Aerglonus
2026-01-27 00:48:03 -06:00
parent b72a5dd84a
commit a96bc9e4a6
4 changed files with 128 additions and 64 deletions

View File

@@ -359,7 +359,13 @@ def get_ip_info(session: Optional[requests.Session] = None) -> dict:
If you provide a Requests Session with a Proxy, that proxies IP information
is what will be returned.
"""
return (session or requests.Session()).get("https://ipinfo.io/json").json()
try:
response = (session or requests.Session()).get("https://ipinfo.io/json", timeout=10)
if response.ok:
return response.json()
except (requests.RequestException, json.JSONDecodeError):
pass
return None
def get_cached_ip_info(session: Optional[requests.Session] = None) -> Optional[dict]: