watchd: make use of ssl configurable
This commit is contained in:
@@ -26,6 +26,7 @@ class WorkerJob():
|
||||
def connect_socket(self):
|
||||
srv = random.choice(config.servers).strip()
|
||||
protos = ['http', 'socks5', 'socks4'] if self.proto is None else [self.proto]
|
||||
server_port = 6697 if config.use_ssl else 6667
|
||||
|
||||
for proto in protos:
|
||||
torhost = random.choice(config.torhosts)
|
||||
@@ -36,7 +37,7 @@ class WorkerJob():
|
||||
]
|
||||
|
||||
try:
|
||||
sock = rocksock.Rocksock(host=srv, port=6697, ssl=True, proxies=proxies, timeout=config.timeout)
|
||||
sock = rocksock.Rocksock(host=srv, port=server_port, ssl=config.use_ssl, proxies=proxies, timeout=config.timeout)
|
||||
sock.connect()
|
||||
sock.send('%s\n' % random.choice(['NICK', 'USER', 'JOIN', 'MODE', 'PART', 'INVITE', 'KNOCK', 'WHOIS', 'WHO', 'NOTICE', 'PRIVMSG', 'PING', 'QUIT']))
|
||||
return sock, proto, duration, torhost, srv, 0
|
||||
|
||||
Reference in New Issue
Block a user