def main(config, handler_cls=ClientHandler): logging.basicConfig(level=config.log_level) nyapass_run( handler_factory=ClientHandlerManager( config, handler_cls=handler_cls, ), config=config, )
def main(config): logging.basicConfig(level=config.log_level) banned_net = BannedNetworks( config.banned_network_list, config.banned_domains, ) nyapass_run( handler_factory=partial(ServerHandler, banned_net=banned_net), config=config, listener_ssl_ctx=create_ssl_ctx(config), )