Early-exit validation: stop once enough valid proxies found

- validate_proxies: target= param — once N valid found, remaining
  tasks skip the HTTP call and drain immediately (no wasted time)
- _build_pool: target = max(min_pool_size, chain_length * 3)
- Settings: min_pool_size (default 20), max_candidates default 400->200
- UI: Stop after N valid / Max candidates fields in Settings tab
- README: updated settings table
- 1 new test for early-exit with unreachable target

Made-with: Cursor
This commit is contained in:
Dr Jones
2026-04-16 02:31:40 -07:00
parent 8ffde94d48
commit 9439037cac
6 changed files with 66 additions and 9 deletions

View File

@@ -579,12 +579,14 @@ class ChainService:
def on_prog(done: int, total: int) -> None:
self._notify({"type": "validate_progress", "done": done, "total": total})
target = max(s.min_pool_size, s.chain_length * 3)
good = await validate_proxies(
unique,
s.ip_check_url,
s.validation_concurrency,
s.validation_timeout_seconds,
on_progress=on_prog,
target=target,
)
random.shuffle(good)