mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-03-12 01:19:02 +00:00
fix: restrict WindscribeVPN to supported regions
This commit is contained in:
@@ -45,14 +45,15 @@ class WindscribeVPN(Proxy):
|
|||||||
"""
|
"""
|
||||||
Get an HTTPS proxy URI for a WindscribeVPN server.
|
Get an HTTPS proxy URI for a WindscribeVPN server.
|
||||||
|
|
||||||
Note: Windscribe's static OpenVPN credentials only work on US servers.
|
Note: Windscribe's static OpenVPN credentials work reliably on US, AU, and NZ servers.
|
||||||
"""
|
"""
|
||||||
query = query.lower()
|
query = query.lower()
|
||||||
|
supported_regions = {"us", "au", "nz"}
|
||||||
|
|
||||||
if query != "us" and query not in self.server_map:
|
if query not in supported_regions and query not in self.server_map:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Windscribe proxy does not currently support the '{query.upper()}' region. "
|
f"Windscribe proxy does not currently support the '{query.upper()}' region. "
|
||||||
"Only US servers are supported with static OpenVPN credentials. "
|
f"Supported regions with reliable credentials: {', '.join(sorted(supported_regions))}. "
|
||||||
)
|
)
|
||||||
|
|
||||||
if query in self.server_map:
|
if query in self.server_map:
|
||||||
@@ -66,6 +67,7 @@ class WindscribeVPN(Proxy):
|
|||||||
if not hostname:
|
if not hostname:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
hostname = hostname.split(':')[0]
|
||||||
return f"https://{self.username}:{self.password}@{hostname}:443"
|
return f"https://{self.username}:{self.password}@{hostname}:443"
|
||||||
|
|
||||||
def get_random_server(self, country_code: str) -> Optional[str]:
|
def get_random_server(self, country_code: str) -> Optional[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user