mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-25 12:19:24 +01:00
drivers: Log SOCKS proxy on connecting
This commit is contained in:
parent
c3f39fc93b
commit
cca1156b90
@ -278,7 +278,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
|||||||
drivers.log.connectError(self.currentServer, e)
|
drivers.log.connectError(self.currentServer, e)
|
||||||
self.scheduleReconnect()
|
self.scheduleReconnect()
|
||||||
return
|
return
|
||||||
drivers.log.connect(self.currentServer)
|
drivers.log.connect(self.currentServer, socks_proxy=socks_proxy)
|
||||||
try:
|
try:
|
||||||
self.conn = utils.net.getSocket(
|
self.conn = utils.net.getSocket(
|
||||||
address,
|
address,
|
||||||
|
@ -173,9 +173,14 @@ def run():
|
|||||||
|
|
||||||
class Log(object):
|
class Log(object):
|
||||||
"""This is used to have a nice, consistent interface for drivers to use."""
|
"""This is used to have a nice, consistent interface for drivers to use."""
|
||||||
def connect(self, server):
|
def connect(self, server, socks_proxy=None):
|
||||||
self.info('Connecting to %s:%s.',
|
if socks_proxy:
|
||||||
server.hostname, server.port)
|
socks_phrase = ' Via SOCKS proxy %s'
|
||||||
|
else:
|
||||||
|
socks_phrase = ''
|
||||||
|
socks_proxy = ''
|
||||||
|
self.info('Connecting to %s:%s.' + socks_phrase,
|
||||||
|
server.hostname, server.port, socks_proxy)
|
||||||
|
|
||||||
def connectError(self, server, e):
|
def connectError(self, server, e):
|
||||||
if isinstance(e, Exception):
|
if isinstance(e, Exception):
|
||||||
|
Loading…
Reference in New Issue
Block a user