Example #1
0
def main(config, handler_cls=ClientHandler):
    logging.basicConfig(level=config.log_level)
    nyapass_run(
        handler_factory=ClientHandlerManager(
            config,
            handler_cls=handler_cls,
        ),
        config=config,
    )
Example #2
0
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),
    )