mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-12 12:05:07 +00:00
feat(service): add GEOBLOCK negative geofence
Regions in GEOBLOCK refuse the service and everything else is allowed. A hit stops the run with a region error instead of auto-proxying; the check also covers proxy exits and the remote-dl client region.
This commit is contained in:
@@ -109,6 +109,13 @@ def test_build_error_response_debug_mode_includes_traceback() -> None:
|
||||
(Exception("Connection refused"), APIErrorCode.NETWORK_ERROR),
|
||||
(TimeoutError("read timeout"), APIErrorCode.NETWORK_ERROR),
|
||||
(Exception("Not available in your region"), APIErrorCode.GEOFENCE),
|
||||
(Exception("Service is geoblocked in GB"), APIErrorCode.GEOFENCE),
|
||||
(
|
||||
Exception(
|
||||
"Service is not available in your region (GB). Pass --proxy with a proxy outside the blocked regions."
|
||||
),
|
||||
APIErrorCode.GEOFENCE,
|
||||
),
|
||||
(Exception("Title not found"), APIErrorCode.NOT_FOUND),
|
||||
(Exception("HTTP 429 too many requests"), APIErrorCode.RATE_LIMITED),
|
||||
(Exception("DRM license fetch failed"), APIErrorCode.DRM_ERROR),
|
||||
|
||||
Reference in New Issue
Block a user