def __init__( self, parent, socket ):
self.parent = parent
# A simple connection header sent by the proxy before the connection
# content, it encapsulates the original connection source information.
self.address = msgpack.unpackb( socket.recv( struct.unpack( '!I', socket.recv( 4 ) )[ 0 ] ) )
self.parent.log( 'Remote address: %s' % str( self.address ) )
try:
socket = parent.sslContext.wrap_socket( socket,
server_side = True,
do_handshake_on_connect = True,
suppress_ragged_eofs = True )
except:
raise DisconnectException
self.s = socket
self.aid = None
self.lock = Semaphore( 1 )
self.r = rpcm( isHumanReadable = True, isDebug = self.parent.log )
self.r.loadSymbols( Symbols.lookups )
self.connId = uuid.uuid4()
self.hostName = None
self.int_ip = None
self.ext_ip = None
self.tags = []
评论列表
文章目录