mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
doAnonymousUpstream used limit = len(pool), so a request that every exit rejects (403/429) walked the whole proxyfile, up to two legs per exit, before failing. With a ~24 exit proxyfile this showed up as requests with 19-77 attempts and 200-660s of wall time, all ending in a 403/429 or a client cancel. Cap the static exit walk at 8. The #pool rule is unchanged: when a pool entry is present the limit still rises to retry.max_attempts, so a single rotating #pool entry keeps its per-attempt fresh IP.