added proxy managament from dsqls module

This commit is contained in:
tpv committed 2026-06-30 12:43:10 -07:00
1 parent 4f7dd161ef
commit 4978b9d194
2 files changed
-25

No files matched your search

-22
View File
@@ -29,28 +29,6 @@ def get_bot_token(is_production: bool) -> str:
return DEVELOPMENT_BOT_TOKEN
@cache
def get_proxies() -> list[str]:
with PROXIES_PATH.open() as f:
proxies = []
for line in f:
line = line.strip()
if not line:
continue
parts = line.split(":", 3)
if len(parts) == 4 and not parts[1].startswith("//"):
host, port, user, password = parts
proxies.append(f"http://{user}:{password}@{host}:{port}")
else:
proxies.append(f"http://{line}")
if not proxies:
raise ValueError("Proxy list cannot be empty")
return proxies
def get_config(
monitor_name: str, use_production_path: bool = False
) -> tuple[dict, pathlib.Path]: