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:
@@ -759,8 +759,10 @@ def main() -> None:
|
||||
|
||||
val_sec = _section("Validation")
|
||||
_fld(val_sec, "Concurrent validators", "conc", str(s.validation_concurrency))
|
||||
_fld(val_sec, "Max candidates per cycle", "maxc", str(s.max_candidates),
|
||||
"(random sample from fetch)")
|
||||
_fld(val_sec, "Stop after N valid proxies found", "minpool", str(s.min_pool_size),
|
||||
"(early-exit — stop testing once enough found)")
|
||||
_fld(val_sec, "Max candidates to test per cycle", "maxc", str(s.max_candidates),
|
||||
"(shuffled random sample from fetch)")
|
||||
_fld(val_sec, "Per-proxy timeout (sec)", "timeout", str(s.validation_timeout_seconds))
|
||||
|
||||
sec_sec = _section("Security")
|
||||
@@ -808,6 +810,7 @@ def main() -> None:
|
||||
health_check_seconds=min(3600, max(10, int(entries["health"].get().strip()))),
|
||||
full_refresh_seconds=min(86400, max(60, int(entries["refresh"].get().strip()))),
|
||||
validation_concurrency=max(1, int(entries["conc"].get().strip())),
|
||||
min_pool_size=max(3, int(entries["minpool"].get().strip())),
|
||||
max_candidates=max(10, int(entries["maxc"].get().strip())),
|
||||
validation_timeout_seconds=min(120.0, max(2.0, float(entries["timeout"].get().strip()))),
|
||||
prefer_elite=bool(elite_var.get()),
|
||||
|
||||
Reference in New Issue
Block a user