From e0dc8257e10a8cf5ce5e0cb0be38ce59efb11586 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Tue, 24 May 2022 12:08:37 -0700 Subject: [PATCH] update proxies to include https onions --- xmrnodes/helpers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xmrnodes/helpers.py b/xmrnodes/helpers.py index 3449bfe..419ed76 100644 --- a/xmrnodes/helpers.py +++ b/xmrnodes/helpers.py @@ -15,12 +15,13 @@ from xmrnodes import config def make_request(url: str, path="/get_info", data=None): headers = {"Origin": "https://monero.fail"} if is_onion(url): - proxies = {"http": f"socks5h://{config.TOR_HOST}:{config.TOR_PORT}"} - timeout = 18 + _p = f"socks5h://{config.TOR_HOST}:{config.TOR_PORT}" + proxies = {"http": p, "https": p} + timeout = 30 else: proxies = None - timeout = 6 - r = r_get(url + path, timeout=timeout, proxies=proxies, json=data, headers=headers) + timeout = 10 + r = r_get(url + path, timeout=timeout, proxies=proxies, json=data, headers=headers, verify=False) r.raise_for_status() return r