mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-07-13 19:10:10 +03:00
remove caching for domains check
This commit is contained in:
+3
-1
@@ -1,5 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import string
|
||||||
import random
|
import random
|
||||||
import socket as _socket
|
import socket as _socket
|
||||||
import threading
|
import threading
|
||||||
@@ -53,7 +54,8 @@ proxy_config = ProxyConfig()
|
|||||||
|
|
||||||
def _fetch_cfproxy_domain_list() -> List[str]:
|
def _fetch_cfproxy_domain_list() -> List[str]:
|
||||||
try:
|
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:
|
with urlopen(req, timeout=10) as resp:
|
||||||
text = resp.read().decode('utf-8', errors='replace')
|
text = resp.read().decode('utf-8', errors='replace')
|
||||||
encoded = [
|
encoded = [
|
||||||
|
|||||||
Reference in New Issue
Block a user