I know about: https://check.torproject.org/

It uses HTML which can change at any moment, and is intended for humans.

I'm looking for some URL (or other method) which wastes as little resources as possible to tell me whether the connection is going over Tor or not, for the purpose of auto-verifying that "Tor is still running/working". Something which just returns a minimal JSON blob or even just a "0" or "1" would be ideal.

Is there such a thing?

1 Answer 1


Why do you think it would change at any moment? I'm too searching for short/comfortable json-like-way. But, for the first time, I do not think that plain/html - is high-resources or would be changed too often or smthng...

https://check.torproject.org/ contains very clean text, if you are using tor:

<h1 class="not">

      Congratulations. This browser is configured to use Tor.


So, even simple bash script could give you 0/1 as out:

pattern="Congratulations. This browser is configured to use Tor."

result="$(torsocks wget -O - "${url}" 2>&1 | grep "${pattern}")"

[ ! -z "${result}" ] && echo 1 || echo 0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .