feat(service): warn when a proxy exit is outside GEOFENCE

This commit is contained in:
imSp4rky
2026-11-30 09:48:54 -07:00
parent f0163439d4
commit ac7d10abb6
7 changed files with 95 additions and 16 deletions
+3 -2
View File
@@ -108,7 +108,8 @@ Declared at class level to configure framework behaviour:
`GEOFENCE` drives an automatic proxy: on startup, if you did not pass an
explicit `--proxy`, the base class does a live IP check and, if your region is
blocked, fetches a proxy to `GEOFENCE[0]` from your configured proxy providers.
blocked, fetches a proxy to `GEOFENCE[0]` from your configured proxy providers. A
proxy exit outside `GEOFENCE` logs a warning and the run continues.
`GEOBLOCK` is the negative form: the service works everywhere except the listed
regions. With no `GEOFENCE` to name a main region, a `GEOBLOCK` hit stops the run
@@ -117,7 +118,7 @@ with a "not available in your region" error; pass `--proxy` yourself.
```python
class EXAMPLE(Service):
ALIASES = ("EX", "DOMAIN")
GEOFENCE = ("US", "UK")
GEOFENCE = ("US", "GB")
VAULT_TAG = "DIFFERENT_NAME"
+2 -1
View File
@@ -124,7 +124,8 @@ resolved through the per-service `proxy_map`, and, if `GEOFENCE` is set and you
IP check and auto-fetches a proxy to `GEOFENCE[0]` when it detects a geoblock. A
`GEOBLOCK` hit with no `GEOFENCE` stops the run with a "not available in your region"
error, because there is no main region to fetch a proxy for; pass `--proxy` yourself.
A proxy whose exit is in a `GEOBLOCK` region stops the run the same way.
A proxy whose exit is in a `GEOBLOCK` region stops the run the same way. A proxy whose exit is
outside `GEOFENCE` logs a warning and the run continues.
See [Proxies and VPN](../guide/proxies-and-vpn.md).
!!! note "`TrackRequest`"
+3 -2
View File
@@ -231,9 +231,10 @@ proxy. The service stops with `Proxy check failed` in two cases:
unshackle tries each geolocation API in turn, and a 429 moves on to the next one. If at
least one API answers through the proxy but none of them gives an IP, the proxy passes
the check without the IP comparison. unshackle does not compare the exit country with the region you asked for,
because geolocation data can be out of date.
because geolocation data can be out of date. When the service lists the regions it supports and
the proxy exit is in none of them, unshackle logs a warning and continues.
Over the REST API, the server returns this failure to the client as `INVALID_PROXY`.
Over the REST API, the server returns a `Proxy check failed` error to the client as `INVALID_PROXY`.
### System proxy and environment variables