If the whole internet connection is passing through the proxy/vpn/tunnel then not a chance, also tor uses a protocol that you can't tell if it's a tor relay or not.
Actually testing if connection is from Tor is trivial, as Tor advertises list of all exit nodes.
Detecting proxies/vpns/tunnels is of course impossible to do 100% accurately, but you can try to build blacklists of known services (and that's what nastyhosts does), greatly reducing problem.
You beat me to it.. Just add exit nodes to blacklist DB tables.. TOR defeated
SMS with SMS verification on region-change is also proven to beat TOR with no blacklisting or proxy-detection at all..