proxywatchd.py: randomly choose from available regex keys

This commit is contained in:
Your Name
2021-07-05 16:54:17 +02:00
parent d78212ac50
commit d4dd2a42ea

View File

@@ -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