Removed dev artifacts from Tor evaluation

This commit is contained in:
SimplifiedPrivacy 2026-07-07 17:09:08 -04:00
parent a1409fd1d5
commit f7a05f8143

View file

@ -48,31 +48,25 @@ def evaluate_tor_networking_problem(
client_observer: Optional[ClientObserver] = None,
) -> 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)
logger.debug(f"Evaluating a networking problem for a Tor connection")
logger.debug("checking if Tor works against the official Tor Project API..")
# if not is_tor_working(connection_observer):
# return {"valid": False, "error_code": "tor_issue"}
# else:
# tor_fine = f"While there were connection issues, but Tor is working fine!"
# logger.error(tor_fine, exc_info=True)
# logger.debug(tor_fine)
if not is_tor_working(connection_observer):
return {"valid": False, "error_code": "tor_issue"}
else:
tor_fine = f"While there were connection issues, but Tor is working fine!"
logger.error(tor_fine, exc_info=True)
logger.debug(tor_fine)
logger.debug("Check the original DNS via Tor...")
# if is_dns_problem_via_tor(domain_only, connection_observer):
# return {"valid": False, "error_code": "dns_issue"}
# else:
# 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.debug(dns_fine)
if is_dns_problem_via_tor(domain_only, connection_observer):
return {"valid": False, "error_code": "dns_issue"}
else:
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.debug(dns_fine)
# can't solve it:
return {"valid": False, "error_code": "unknown"}