From eec056ccd1c8e7fd82d112610e2deba259205d9c Mon Sep 17 00:00:00 2001 From: Jefry Lagrange Date: Fri, 18 Nov 2011 18:21:34 -0500 Subject: [PATCH] refactoring --- src/common/socks5.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/socks5.py b/src/common/socks5.py index 9afe48d3c..e70ccb38a 100644 --- a/src/common/socks5.py +++ b/src/common/socks5.py @@ -1088,6 +1088,7 @@ class Socks5Server(Socks5): Socks5.__init__(self, idlequeue, host, port, initiator, target, sid) + self.type = 'server' def main(self): """ @@ -1190,6 +1191,8 @@ class Socks5Client(Socks5): Socks5.__init__(self, idlequeue, host, port, initiator, target, sid) + self.type = 'client' + def main(self, timeout=0): """ Begin negotiation. on success 'address' != 0 @@ -1341,7 +1344,6 @@ class Socks5SenderClient(Socks5Client, Socks5Sender): Socks5Sender.__init__(self,idlequeue, sock_hash, parent,_sock, host, port, fingerprint , connected, file_props) - self.type = 'client' @@ -1358,7 +1360,6 @@ class Socks5SenderServer(Socks5Server, Socks5Sender): host, port, fingerprint , connected, file_props) - self.type = 'server' class Socks5ReceiverClient(Socks5Client, Socks5Receiver): @@ -1371,7 +1372,6 @@ class Socks5ReceiverClient(Socks5Client, Socks5Receiver): Socks5Receiver.__init__(self, idlequeue, streamhost, sid, file_props, fingerprint) - self.type = 'client' @@ -1387,7 +1387,6 @@ class Socks5ReceiverServer(Socks5Server, Socks5Receiver): Socks5Receiver.__init__(self, idlequeue, streamhost, sid, file_props, fingerprint) - self.type = 'server' class Socks5Listener(IdleObject):