def __init__(self): self.ip = config.fileserver_ip self.port = config.fileserver_port self.log = logging.getLogger(__name__) if config.ip_external: # Ip external definied in arguments self.port_opened = True SiteManager.peer_blacklist.append((config.ip_external, self.port)) # Add myself to peer blacklist else: self.port_opened = None # Is file server opened on router self.sites = SiteManager.list()
def __init__(self): self.ip = config.ui_ip self.port = config.ui_port if self.ip == "*": self.ip = "" # Bind all #self.sidebar_websockets = [] # Sidebar websocket connections #self.auth_key = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(12)) # Global admin auth key self.sites = SiteManager.list() self.log = logging.getLogger(__name__) self.ui_request = UiRequest(self)
def __init__(self, server=None): if server: self.server = server self.log = server.log self.sites = SiteManager.list()