diff --git a/pddnsc/cli.py b/pddnsc/cli.py index 483943e..8922ba0 100644 --- a/pddnsc/cli.py +++ b/pddnsc/cli.py @@ -62,8 +62,8 @@ async def output_task(result): ) -async def app(ipv4t, ipv6t): - config = toml.load("settings/config.toml") +async def app(config, ipv4t, ipv6t): + use_plugins(config, ipv4t, ipv6t) debug = config.get("debug", False) @@ -97,10 +97,13 @@ async def app(ipv4t, ipv6t): async def main(): + config = toml.load("settings/config.toml") async with httpx.AsyncHTTPTransport( - local_address="0.0.0.0", - ) as ipv4t, httpx.AsyncHTTPTransport(local_address="::") as ipv6t: - await app(ipv4t, ipv6t) + local_address="0.0.0.0", proxy=config.get("proxy_v4") + ) as ipv4t, httpx.AsyncHTTPTransport( + local_address="::", proxy=config.get("proxy_v6") + ) as ipv6t: + await app(config, ipv4t, ipv6t) if __name__ == "__main__":