From 58738618623f4596b96a309368eb69dc3dad21b8 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 14 Nov 2020 19:35:31 +0100 Subject: [PATCH] Add some more settings --- fapi/factory.py | 2 +- fapi/fapi.py | 2 +- settings.py_example | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fapi/factory.py b/fapi/factory.py index 93ccd1d..0cef375 100644 --- a/fapi/factory.py +++ b/fapi/factory.py @@ -35,7 +35,7 @@ print("""\033[91m async def _setup_cache(app: Quart): global cache data = { - "address": "redis://localhost" + "address": settings.redis_address } if settings.redis_password: diff --git a/fapi/fapi.py b/fapi/fapi.py index 4b5f016..9b8fa21 100644 --- a/fapi/fapi.py +++ b/fapi/fapi.py @@ -346,7 +346,7 @@ class FeatherApi: timeout = aiohttp.ClientTimeout(total=5) d = {'timeout': timeout} if ".onion" in node: - d['connector'] = ProxyConnector.from_url('socks5://127.0.0.1:9050') + d['connector'] = ProxyConnector.from_url(settings.tor_socks) d['timeout'] = aiohttp.ClientTimeout(total=12) try: async with aiohttp.ClientSession(**d) as session: diff --git a/settings.py_example b/settings.py_example index 6898901..9ec119c 100644 --- a/settings.py_example +++ b/settings.py_example @@ -6,6 +6,8 @@ debug = False host = "127.0.0.1" port = 1337 redis_password = None +redis_address = "redis://localhost" +tor_socks = "socks5://127.0.0.1:9050" rpc_url = "http://127.0.0.1:18089" xmrchain = "https://stagenet.xmrchain.net"