mirror of
https://github.com/lalanza808/monero.fail.git
synced 2025-08-21 03:58:19 -04:00
update proxies to include https onions
This commit is contained in:
parent
e94f0057bf
commit
e0dc8257e1
1 changed files with 5 additions and 4 deletions
|
@ -15,12 +15,13 @@ from xmrnodes import config
|
||||||
def make_request(url: str, path="/get_info", data=None):
|
def make_request(url: str, path="/get_info", data=None):
|
||||||
headers = {"Origin": "https://monero.fail"}
|
headers = {"Origin": "https://monero.fail"}
|
||||||
if is_onion(url):
|
if is_onion(url):
|
||||||
proxies = {"http": f"socks5h://{config.TOR_HOST}:{config.TOR_PORT}"}
|
_p = f"socks5h://{config.TOR_HOST}:{config.TOR_PORT}"
|
||||||
timeout = 18
|
proxies = {"http": p, "https": p}
|
||||||
|
timeout = 30
|
||||||
else:
|
else:
|
||||||
proxies = None
|
proxies = None
|
||||||
timeout = 6
|
timeout = 10
|
||||||
r = r_get(url + path, timeout=timeout, proxies=proxies, json=data, headers=headers)
|
r = r_get(url + path, timeout=timeout, proxies=proxies, json=data, headers=headers, verify=False)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue