Files
OmniRoute/changelog.d/fixes/10868-proxy-echo-ipv4-fallback.md
Nguyen Thanh Dat a72dc25c04 fix(proxy): stop reporting IPv4-only proxies as dead (#10868)
Obrigado — bug real e bem raiz-causado: api64.ipify.org é IPv6-first e derruba tunnels IPv4-only, o que estava reportando proxies vivos como mortos.

Validação (worktree combinado a partir de origin/release/v3.8.50, 0 conflitos):
- typecheck:core limpo, complexity 2563/2774, cognitive-complexity 1155/1223 (baseline)
- tests/unit/proxy-echo-ipv4-fallback-9694.test.ts — 8/8 passando (cobre ordem, split de budget, override, proxy morto de verdade)
- Suítes proxy-relacionadas: 805/817 na branch vs 797/809 no release, as 11 falhas são idênticas em ambos os lados e não relacionadas (TLS transport, tproxy CA, SSRF fallback)
2026-08-20 15:19:32 -03:00

1.4 KiB

  • fix(proxy): proxy "Test connection" no longer reports an IPv4-only SOCKS5/SSH proxy as dead. #1255 moved every egress probe from api.ipify.org to api64.ipify.org so proxies with IPv6 egress could be tested, but api64 is IPv6-first: a tunnel with no IPv6 route has nothing to connect to, so the probe hung until the caller's deadline and a proxy that was carrying live LLM traffic came back as a failure. Swapping the target to api4 fixes that case and re-breaks the one #1255 fixed, so the probe now tries the targets in order instead — api64 first, so a proxy with working IPv6 answers on the first attempt and keeps the exact behaviour #1255 introduced, including which of its addresses is reported (the egress IP is used as an identity to detect accounts of one rotation group sharing an address, so the attempts are sequential rather than raced). The attempts split the budget each call site already enforced, so no probe can take longer than it could before, and each attempt gets its own AbortController so exhausting the budget on an unreachable target does not abort the next one. OMNIROUTE_PROXY_ECHO_URL pins a single target — including a self-hosted echo — replacing the workaround of rewriting the compiled bundle after every upgrade. The relay branch of the test route still targets api64 through x-relay-target, since that request egresses from the relay worker rather than the operator's tunnel