Files
OmniRoute/tests/unit
diegosouzapw f2d7df1f94 feat(proxy): egress IP visibility + pool validation (codex anomaly)
The proxy logs captured the INBOUND client IP (x-forwarded-for) but never the
OUTBOUND/egress IP — so there was no way to confirm by which IP each account
leaves. For rotating providers that is the whole game: probing the servers
showed every codex account had a distinct proxy assigned, but ALL proxies were
dead (egress timeout) while still marked status=active, so accounts fell back
to the shared host IPv6 /64 (same /64 across .16/.17/.18) → OpenAI anomaly
revocation ("authentication token has been invalidated").

- src/lib/proxyEgress.ts: resolveEgressIp() (echo-IP via the resolved proxy,
  cached), analyzeEgressSharing() (flags >=2 same-rotation-group accounts on
  one egress IP), diagnoseAllEgressIps(), and validateProxyPool() (probes each
  proxy and persists status=active/error so the dead-proxy filter takes them out
  of rotation automatically).
- proxyLogger: new egressIp field + a structured [ProxyEgress] line
  (in=clientIp out=egressIp) so the proxy logs show entry AND exit IP.
- chatHelpers: populate egressIp from a non-blocking cache, warm in background.
- GET/POST /api/settings/proxies/egress: diagnose + validate from the dashboard.

TDD: 5 tests (egress resolve/cache, sharing analysis, diagnose wiring, pool
validation). 37/37 proxy+oauth tests green, typecheck:core=0, lint clean.
2026-06-12 00:25:13 -03:00
..
2026-05-23 01:46:59 -03:00
2026-06-09 22:57:12 -03:00
2026-06-09 22:57:12 -03:00
2026-05-26 23:51:47 -03:00
2026-06-09 22:57:12 -03:00
2026-05-21 01:29:12 -03:00
2026-06-09 22:57:12 -03:00
2026-06-11 04:01:24 -03:00
2026-06-09 22:57:12 -03:00
2026-05-29 12:44:29 -03:00
2026-06-10 13:49:08 -03:00
2026-05-23 01:46:59 -03:00
2026-05-26 23:51:47 -03:00
2026-06-10 13:49:08 -03:00
2026-04-19 19:50:30 -03:00
2026-05-29 12:44:29 -03:00
2026-06-11 04:01:24 -03:00
2026-06-06 19:13:11 -03:00
2026-05-26 23:51:47 -03:00
2026-06-10 13:49:08 -03:00
2026-05-26 23:51:47 -03:00
2026-05-29 12:44:29 -03:00
2026-05-26 23:51:47 -03:00
2026-05-26 23:51:47 -03:00
2026-05-29 12:44:29 -03:00
2026-05-21 01:29:12 -03:00
2026-05-24 18:05:58 -03:00
2026-05-26 23:51:47 -03:00
2026-06-10 13:49:08 -03:00
2026-06-09 22:57:12 -03:00
2026-06-09 22:57:12 -03:00
2026-05-26 23:51:47 -03:00
2026-05-29 12:44:29 -03:00
2026-05-29 12:44:29 -03:00
2026-05-26 23:51:47 -03:00
2026-05-24 18:05:58 -03:00
2026-05-26 23:51:47 -03:00
2026-05-29 12:44:29 -03:00
2026-05-26 23:51:47 -03:00
2026-05-10 00:55:06 -03:00
2026-05-29 19:54:00 -03:00
2026-05-26 23:51:47 -03:00
2026-05-29 12:44:29 -03:00
2026-05-29 12:44:29 -03:00
2026-05-21 01:29:12 -03:00
2026-04-30 01:27:03 -03:00
2026-04-30 01:27:03 -03:00
2026-05-26 23:51:47 -03:00
2026-05-10 00:55:06 -03:00
2026-05-26 23:51:47 -03:00
2026-04-30 14:08:50 -03:00
2026-06-11 04:01:24 -03:00
2026-05-29 12:44:29 -03:00
2026-05-26 23:51:47 -03:00
2026-05-26 23:51:47 -03:00
2026-05-26 23:51:47 -03:00
2026-06-10 13:49:08 -03:00
2026-05-23 01:46:59 -03:00
2026-05-26 23:51:47 -03:00
2026-04-30 01:27:03 -03:00
2026-04-30 01:27:03 -03:00
2026-05-26 23:51:47 -03:00
2026-05-23 01:46:59 -03:00
2026-05-23 01:46:59 -03:00
2026-05-23 01:46:59 -03:00
2026-06-09 15:56:24 -03:00
2026-06-10 13:49:08 -03:00
2026-05-29 19:54:00 -03:00
2026-04-28 10:03:39 -03:00
2026-06-07 07:20:02 -03:00
2026-06-07 07:20:02 -03:00
2026-05-24 18:05:58 -03:00
2026-05-24 18:05:58 -03:00
2026-06-07 07:20:02 -03:00
2026-04-28 20:46:25 -03:00
2026-05-29 12:44:29 -03:00
2026-05-29 12:44:29 -03:00
2026-05-23 01:46:59 -03:00
2026-06-04 20:05:38 -03:00
2026-05-26 23:51:47 -03:00
2026-06-06 19:13:11 -03:00
2026-06-09 15:56:24 -03:00
2026-06-09 15:56:24 -03:00
2026-05-26 23:51:47 -03:00
2026-05-26 23:51:47 -03:00
2026-06-04 20:05:38 -03:00
2026-05-29 12:44:29 -03:00
2026-06-07 07:20:02 -03:00
2026-06-11 04:01:24 -03:00
2026-05-24 18:05:58 -03:00
2026-05-26 23:51:47 -03:00