remove caching for domains check

This commit is contained in:
Flowseal
2026-04-10 00:59:43 +03:00
parent 6e0e567790
commit 3dfcc27932

View File

@@ -1,5 +1,6 @@
import logging
import os
import string
import random
import socket as _socket
import threading
@@ -53,7 +54,8 @@ proxy_config = ProxyConfig()
def _fetch_cfproxy_domain_list() -> List[str]:
try:
req = Request(CFPROXY_DOMAINS_URL, headers={'User-Agent': 'tg-ws-proxy'})
req = Request(CFPROXY_DOMAINS_URL + "?" + "".join(random.choices(string.ascii_letters, k=7)),
headers={'User-Agent': 'tg-ws-proxy'})
with urlopen(req, timeout=10) as resp:
text = resp.read().decode('utf-8', errors='replace')
encoded = [