Removed dev artifacts from Tor evaluation
This commit is contained in:
parent
a1409fd1d5
commit
f7a05f8143
1 changed files with 12 additions and 18 deletions
|
|
@ -48,31 +48,25 @@ def evaluate_tor_networking_problem(
|
||||||
client_observer: Optional[ClientObserver] = None,
|
client_observer: Optional[ClientObserver] = None,
|
||||||
) -> dict:
|
) -> dict:
|
||||||
|
|
||||||
print("evaluate_tor_networking_problem is called")
|
|
||||||
|
|
||||||
if client_observer is not None:
|
|
||||||
print("client observer is not none")
|
|
||||||
client_observer.notify('synchronizing', f"Evaluating Tor..")
|
|
||||||
|
|
||||||
domain_only = extract_domain(url)
|
domain_only = extract_domain(url)
|
||||||
logger.debug(f"Evaluating a networking problem for a Tor connection")
|
logger.debug(f"Evaluating a networking problem for a Tor connection")
|
||||||
|
|
||||||
logger.debug("checking if Tor works against the official Tor Project API..")
|
logger.debug("checking if Tor works against the official Tor Project API..")
|
||||||
# if not is_tor_working(connection_observer):
|
if not is_tor_working(connection_observer):
|
||||||
# return {"valid": False, "error_code": "tor_issue"}
|
return {"valid": False, "error_code": "tor_issue"}
|
||||||
# else:
|
else:
|
||||||
# tor_fine = f"While there were connection issues, but Tor is working fine!"
|
tor_fine = f"While there were connection issues, but Tor is working fine!"
|
||||||
# logger.error(tor_fine, exc_info=True)
|
logger.error(tor_fine, exc_info=True)
|
||||||
# logger.debug(tor_fine)
|
logger.debug(tor_fine)
|
||||||
|
|
||||||
logger.debug("Check the original DNS via Tor...")
|
logger.debug("Check the original DNS via Tor...")
|
||||||
|
|
||||||
# if is_dns_problem_via_tor(domain_only, connection_observer):
|
if is_dns_problem_via_tor(domain_only, connection_observer):
|
||||||
# return {"valid": False, "error_code": "dns_issue"}
|
return {"valid": False, "error_code": "dns_issue"}
|
||||||
# else:
|
else:
|
||||||
# dns_fine = f"There were connection issues, but the DNS for {domain_only} via Tor is working fine!"
|
dns_fine = f"There were connection issues, but the DNS for {domain_only} via Tor is working fine!"
|
||||||
# logger.error(dns_fine, exc_info=True)
|
logger.error(dns_fine, exc_info=True)
|
||||||
# logger.debug(dns_fine)
|
logger.debug(dns_fine)
|
||||||
|
|
||||||
# can't solve it:
|
# can't solve it:
|
||||||
return {"valid": False, "error_code": "unknown"}
|
return {"valid": False, "error_code": "unknown"}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue