mirror of
https://github.com/lalanza808/monero.fail.git
synced 2025-03-15 08:36:31 -04:00
update proxies to include https onions
This commit is contained in:
parent
e94f0057bf
commit
e0dc8257e1
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user