mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
An endpoint that already rotates exit IPs (Resin and similar gateways) was handled like a static proxy, which defeated the rotation in three ways: - the cloned transport kept HTTP/2 and keep-alive enabled, so every request reused one CONNECT tunnel and therefore one exit IP, drawing 429s; - a single slow exit marked the whole entry unhealthy and keys were rebound, with scheduled recovery only every 15 minutes; - any 429/5xx put the anonymous node into a 15s-120s cooldown, and that lane has no earliest-expiry fallback, so the request failed with "no healthy anonymous proxies available" (HTTP 502). Mark an entry with a "#pool" fragment (or a "pool+" scheme prefix) to declare it a rotating pool. Pool entries then open a fresh connection per attempt (DisableKeepAlives, no HTTP/2, plus Connection: close on the request), are excluded from cooldown, health eviction, and proxy rebinding, and may be retried up to retry.max_attempts on the anonymous lane instead of once. Config validation and redaction work on the clean URL, the marker stays visible in the operator UI, and deduplication keeps a pool entry next to a static proxy that dials the same endpoint since they are different routes.