From d4dd2a42ea0245bc4573d12baef6004b74a7ad77 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 5 Jul 2021 16:54:17 +0200 Subject: [PATCH] proxywatchd.py: randomly choose from available regex keys --- proxywatchd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxywatchd.py b/proxywatchd.py index cbcb0a3..3a59ea0 100644 --- a/proxywatchd.py +++ b/proxywatchd.py @@ -107,7 +107,7 @@ class WorkerJob(): if self.consecutive_success > 0 and (self.consecutive_success % 3) == 0: use_ssl = 1 server_port = 6697 if use_ssl else 6667 elif checktype == 'http': - srvname = random.choice( ['www.facebook.com', 'www.reddit.com', 'www.twitter.com'] ) + srvname = random.choice( [ i for i in regexes.keys() ]) use_ssl = random.choice([0,1]) if config.watchd.use_ssl == 2 else config.watchd.use_ssl if self.consecutive_success > 0 and (self.consecutive_success % 3) == 0: use_ssl = 1 server_port = 443 if use_ssl else 80