irc: implement use_ssl = 2
0: disabled, 1: enabled, 2: maybe default is 0
This commit is contained in:
committed by
Mickaël Serneels
parent
0eebe4daff
commit
310b01140a
+3
-2
@@ -32,7 +32,8 @@ class WorkerJob():
|
||||
def connect_socket(self):
|
||||
srvname = random.choice(config.servers).strip()
|
||||
protos = ['http', 'socks5', 'socks4'] if self.proto is None else [self.proto]
|
||||
server_port = 6697 if config.watchd.use_ssl else 6667
|
||||
use_ssl = random.choice([0,1]) if config.watchd.use_ssl == 2 else config.watchd.use_ssl
|
||||
server_port = 6697 if use_ssl else 6667
|
||||
|
||||
fail_inc = 1
|
||||
|
||||
@@ -70,7 +71,7 @@ class WorkerJob():
|
||||
]
|
||||
|
||||
try:
|
||||
sock = rocksock.Rocksock(host=srv, port=server_port, ssl=config.watchd.use_ssl, proxies=proxies, timeout=config.watchd.timeout)
|
||||
sock = rocksock.Rocksock(host=srv, port=server_port, ssl=use_ssl, proxies=proxies, timeout=config.watchd.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, srvname, 0
|
||||
|
||||
Reference in New Issue
Block a user