Files
Jason Xu b8b1454a0e fix(warp): rotate exits on a live pool and size it to concurrency
The WARP pool could never rotate: its lifetime context was derived from the
startup deadline, so every standby registration and replacement died with
"context canceled" and requests stayed on the first egress forever. Give the
first registration the caller's deadline and the pool a context that only
Close cancels.

- warp.pool_size is an upper bound. The active ring follows concurrency (one
  exit per lease, one per queued request, plus a spare) and trims idle surplus
  after 60 seconds, so a burst expands it and quiet periods shrink it.
- An IPv6 exit is deduplicated and cooled by its /64 for 30 minutes (IPv4 by
  its /32), since the free quota is scoped to that block.
- 429/403 retires an exit immediately and re-registers right away; a free
  model request keeps switching exits and only returns the last 429 after
  retry.max_attempts, on both the anonymous and the Zen-key lane. 429s no
  longer trip the anonymous breaker or cool the key.
- Pin HTTP/1.1 ALPN and TLSNextProto on the WARP transport: a clone of
  DefaultTransport made after its first dial negotiated h2 and fed SETTINGS
  frames to the HTTP/1.x reader, breaking catalog refresh.
- Default to the IPv6 stack and, with warp.source_ipv6, let each exit bind its
  own outer source from a routed prefix via IPV6_FREEBIND. Endpoints try IPv6
  first and fall back to IPv4, so IPv4-only hosts keep working.
- WebUI, config example and all READMEs describe the new pool and rotation
  behaviour.
2026-10-25 06:49:00 +08:00
..