watchd: remove use_ssl config, use HTTP for non-ssl checks
All checks were successful
CI / syntax-check (push) Successful in 2s
CI / memory-leak-check (push) Successful in 11s

This commit is contained in:
Username
2025-12-26 21:25:52 +01:00
parent f7a762331a
commit 9f81e1e4af
3 changed files with 11 additions and 30 deletions

View File

@@ -1434,25 +1434,15 @@ class TargetTestJob():
ssl_only_check = True # handshake only, no HTTP request
server_port = 443
verifycert = True
elif self.checktype == 'tor':
# Tor check uses HTTP by default (like judges/head)
use_ssl = random.choice([0, 1]) if config.watchd.use_ssl == 2 else config.watchd.use_ssl
ssl_only_check = False
server_port = 443 if use_ssl else 80
verifycert = True if use_ssl else False
else:
use_ssl = random.choice([0, 1]) if config.watchd.use_ssl == 2 else config.watchd.use_ssl
ssl_only_check = False # minimal SSL test (handshake only, no request)
if ps.consecutive_success > 0 and (ps.consecutive_success % 3) == 0:
use_ssl = 1
ssl_only_check = True # periodic MITM check - handshake is sufficient
# head, judges, tor, irc: always use plain HTTP
use_ssl = 0
ssl_only_check = False
verifycert = False
if self.checktype == 'irc':
server_port = 6697 if use_ssl else 6667
server_port = 6667
else:
server_port = 443 if use_ssl else 80
verifycert = True if use_ssl else False
server_port = 80
protos = ['http', 'socks5', 'socks4'] if ps.proto is None else [ps.proto]
last_error_category = None