mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-05-17 00:25:51 +03:00
remove caching for domains check
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user