fix(proxies): return None for unservable queries and repair live providers

Basic, NordVPN, Windscribe, Gluetun and Hola no longer raise on a query they cannot serve. Hola parses stdout only and reports a ban; NordVPN cities use the API filter; uk maps to gb.
This commit is contained in:
imSp4rky
2026-09-25 18:13:31 -06:00
parent 40281660f1
commit 80c0dc4ebf
11 changed files with 278 additions and 108 deletions
+7
View File
@@ -109,3 +109,10 @@ def test_unusable_server_map_entry_is_ignored_with_a_warning(server: object, cap
proxy = SurfsharkVPN(USERNAME, PASSWORD, server_map={"us": server}) # type: ignore[dict-item]
assert "ignoring server_map entry" in caplog.text
assert host(proxy.get_proxy("us")) in US_HOSTS
@pytest.mark.parametrize("key", ["gb", "uk", "GB"])
@pytest.mark.parametrize("query", ["gb", "uk"])
def test_server_map_uk_and_gb_are_the_same_region(key: str, query: str) -> None:
proxy = SurfsharkVPN(USERNAME, PASSWORD, server_map={key: "uk-lon"})
assert host(proxy.get_proxy(query)) == "uk-lon.prod.surfshark.com:443"