Skip to content

Egress fast rotation - #5

Open
Suydev wants to merge 15 commits into
jcleng:mainfrom
Suydev:egress-fast-rotation
Open

Suydev wants to merge 15 commits into
jcleng:mainfrom
Suydev:egress-fast-rotation

Conversation

@Suydev

@Suydev Suydev commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Suydev added 15 commits October 23, 2026 17:31
…-rotation always has candidates

ensureEgress() previously no-oped when untested candidates ran out; now it
scrapes the three sources on demand (bounded) before quick-probing, so a 429
on the direct connection always gets fresh IPs to rotate to instead of
failing fast with an empty pool.
…ile), preferred rotation

- GET /__egress/dashboard: dark control panel — summary cards, my-proxies
  table, paste/file import (adds + tests immediately), pool table with
  per-IP on/off switches + retest buttons, dustbin table with re-enable.
- POST /__egress/import|toggle|retest|remove-user, GET /__egress/full.
- egress-user.json persists user proxies + disabled set (gitignored);
  user proxies are preferred over scraped ones in pickEgress() and are
  never auto-culled. importProxiesFromFile() for shell use.
- fix: normalizeProxyInput rejected http:// URLs (u.protocol is 'http:').
…ol off)

- pickEgress/ensureEgress honor a persisted egressOn flag (egress-user.json);
  off = every relay turn uses the machine's own IP, pool fully ignored.
- POST /__egress/set { on } endpoint; egressState() reports egressOn.
- Dashboard: PROXY/DIRECT switch in the header + a 'Connection mode' panel;
  pool/dustbin/user tables dim while direct-only is active.
…k, grouped cards, 44px capsule buttons, tabular numerals, AA contrast fills
…e's broke client JS; reword. Add inline-script parse check to the gate.
… stats

- ensureEgress probes untested candidates in parallel instead of sequentially
- persist() is debounced (120 ms) and flushable via flushPersist() for tests/shutdown
- recordRequest/recordBytes track per-turn requests, viaProxy/direct, ok/quota/dead, rotations, recoveries
- /__egress/full now exposes stats (requests, viaProxy, directFallbacks, ok, quota, dead, rotations, recoveries, bytesIn/out, series[]) + monotonic events ring
- dashboard: new 'Live decisions' section with KPI tiles, SVG sparkline, recent events list
- /__egress/sweep-now endpoint forces parallel re-verification across the pool
- egress-user.json untracked from git (contains premium credentials; local only)
- tests: telemetry.test.js verifies accumulator increments and flushPersist idempotence
# Conflicts:
#	README.md
#	server.js
#	src/routes.js
#	src/upstream.js
… gate (fail-fast), rotation applies to recoverable 429s only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant