Fix empty proxy sources (empty pool), first-run bat, elite hint
- load_settings/sanitize_settings: treat sources=[] as invalid; restore defaults (all([]) was true) - _build_pool: defensive default sources + clearer empty-fetch log; elite-only empty fetch message - FirstRun_Build_And_Install.bat: Python check + setup_and_build.ps1 - README + test for empty sources sanitize Made-with: Cursor
This commit is contained in:
@@ -217,6 +217,10 @@ def sanitize_settings(s: Settings) -> tuple[Settings, bool]:
|
||||
except (TypeError, ValueError):
|
||||
s.validation_timeout_seconds = 12.0
|
||||
changed = True
|
||||
# Empty list survives "all(isinstance…)" — would skip all fetches and yield an empty pool.
|
||||
if not isinstance(s.sources, list) or not all(isinstance(x, str) for x in s.sources) or len(s.sources) == 0:
|
||||
s.sources = list(Settings().sources)
|
||||
changed = True
|
||||
return s, changed
|
||||
|
||||
|
||||
@@ -240,8 +244,12 @@ def load_settings() -> Settings:
|
||||
for k, v in raw.items():
|
||||
if hasattr(s, k):
|
||||
setattr(s, k, v)
|
||||
if not isinstance(s.sources, list) or not all(isinstance(x, str) for x in s.sources):
|
||||
s.sources = Settings().sources
|
||||
if (
|
||||
not isinstance(s.sources, list)
|
||||
or not all(isinstance(x, str) for x in s.sources)
|
||||
or len(s.sources) == 0
|
||||
):
|
||||
s.sources = list(Settings().sources)
|
||||
if s.obfuscation_mode not in OBFUSCATION_MODES:
|
||||
s.obfuscation_mode = "auto"
|
||||
if not isinstance(s.pinned_chain, list):
|
||||
|
||||
Reference in New Issue
Block a user