watchd: remove use_ssl config, use HTTP for non-ssl checks
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user