add proxy conf
This commit is contained in:
parent
bbfb4f92af
commit
b7097540a2
@ -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__":
|
||||
|
Loading…
Reference in New Issue
Block a user