def __init__(self): try: managedInfo = init(transports.transports.keys()) except EnvException: log.warn("Client managed-proxy protocol failed.") return log.debug("pyptlib gave us the following data:\n'%s'", pprint.pformat(managedInfo)) for transport in managedInfo['transports']: ok, addrport = self.launchClient( transport, managedInfo) # XXX start using exceptions if ok: log.debug("Successfully launched '%s' at '%s'" % (transport, str(addrport))) reportSuccess(transport, 4, addrport, None, None) # XXX SOCKS v4 hardcoded else: log.info("Failed to launch '%s'" % transport) reportFailure(transport, 'Failed to launch') reportEnd() log.info("Starting up the event loop.") reactor.run()
def do_managed_client(): should_start_event_loop = False try: managedInfo = init(transports.transports.keys()) except EnvError, err: log.warning("Client managed-proxy protocol failed (%s)." % err) return
def __init__(self): try: managedInfo = init(transports.transports.keys()) except EnvException: log.warn("Client managed-proxy protocol failed.") return log.debug("pyptlib gave us the following data:\n'%s'", pprint.pformat(managedInfo)) for transport in managedInfo['transports']: ok, addrport = self.launchClient(transport, managedInfo) # XXX start using exceptions if ok: log.debug("Successfully launched '%s' at '%s'" % (transport, str(addrport))) reportSuccess(transport, 4, addrport, None, None) # XXX SOCKS v4 hardcoded else: log.info("Failed to launch '%s'" % transport) reportFailure(transport, 'Failed to launch') reportEnd() log.info("Starting up the event loop.") reactor.run()