def __init__(self, stateLocation, managedTransportVer=None, transports=None, proxy=None): Config.__init__(self, stateLocation, managedTransportVer, transports) self.proxy = proxy
def __init__(self): Config.__init__(self) self.transports = self.get('TOR_PT_CLIENT_TRANSPORTS').split(',') if '*' in self.transports: self.allTransportsEnabled = True self.transports.remove('*')
def checkClientMode(): """ Checks to see if the daemon has been launched in client mode or server mode. Returns True if it is in client mode, otherwise False. """ try: c = Config() return c.checkClientMode() except EnvException: return False
def checkClientMode(): # XXX WTF!???! This also exists in config.py. """ Check whether Tor wants us to run as a client or as a server. :returns: bool -- True if Tor wants us to run as a client. """ try: c = Config() return c.checkClientMode() except EnvError: return False
def __init__(self): # throws EnvError """ Initialize the ClientConfig object. This causes the state location, managed transport, and transports version to be set. """ Config.__init__(self) self.transports = self.get('TOR_PT_CLIENT_TRANSPORTS').split(',' ) if '*' in self.transports: self.allTransportsEnabled = True self.transports.remove('*')
def __init__(self): # throws EnvError """ Initialize the ClientConfig object. This causes the state location, managed transport, and transports version to be set. """ Config.__init__(self) self.extendedServerPort = self.get('TOR_PT_EXTENDED_SERVER_PORT' ) orport = self.get('TOR_PT_ORPORT').split(':') orport[1]=int(orport[1]) self.ORPort=orport binds = self.get('TOR_PT_SERVER_BINDADDR').split(',') for bind in binds: (key, value) = bind.split('-') self.serverBindAddr[key] = value self.transports = self.get('TOR_PT_SERVER_TRANSPORTS').split(',' ) if '*' in self.transports: self.allTransportsEnabled = True self.transports.remove('*')