fix(upstream): stop retrying request-level rejections and cap anonymous exits

The anonymous walk now ends on a deterministic 4xx instead of replaying the same context-length rejection through every exit and tier. Static exits are capped by performance.max_anonymous_exits, and an IP-level abuse block marks only its exit; the lane breaker opens only when every exit is blocked, so a single 403 no longer pauses the lane. The Zen key tier is skipped after an IP block while the authenticated Go tier remains available. Add performance.free_tier_block_seconds, make the breaker half-open probe single-flight, and coordinate refreshes and availability probes with the breaker. Update the shipped example to start on the anonymous lane.
This commit is contained in:
Jason Xu committed 2026-10-21 02:52:52 +08:00
1 parent ddb5c14b3f
commit 0bb23c7a7f
11 files changed
+265 -85

No files matched your search

+5 -3
View File
@@ -1,9 +1,9 @@
{
"listen": "127.0.0.1:8080",
"server_keys": ["change-this-local-key"],
"zen_keys": ["sk-your-zen-key"],
"zen_keys": [],
"go_keys": [],
"anonymous": false,
"anonymous": true,
"proxies": ["direct"],
"proxyfile": "",
"upstream": {
@@ -28,7 +28,9 @@
"connect_timeout_seconds": 5,
"failure_cooldown_seconds": 15,
"attempt_timeout_seconds": 0,
"first_event_timeout_seconds": 0
"first_event_timeout_seconds": 0,
"max_anonymous_exits": 8,
"free_tier_block_seconds": 900
},
"logging": {
"level": "info",