I currently make a HTTPS request to: https://check.torproject.org/
I then check if the output contains this anywhere:
Congratulations. This browser is configured to use Tor.
If it does, I return "true" for my function. Otherwise, I return "false". The name of the function is is_tor_being_used()
.
While this technically works, it seems very "fragile" and also privacy-invasive. Is there no way I can check this without making clearnet requests? And do they really not have a JSON version of that webpage or something? Checking for random text in English, intended for humans, feels fundamentally wrong.