First, we already have a TestSocks config option:
TestSocks 0|1
When this option is enabled, Tor will make a notice-level log
entry for each connection to the Socks port indicating whether
the request used a hostname (safe) or an IP address (unsafe).
This helps to determine whether an application using Tor is pos-
sibly leaking DNS requests. (Default: 0)
This doesn't do quite what your patch does, of course. But is it
sufficient?
Second, even with your patch, an application using the wrong socks
version will do the DNS resolve, and then fail to work. So in a sense
it is broken in *both* respects now. Is this better behavior than before?
I'd like to figure these out a bit more before we simply hand more
options to the users and hope it solves the problem. :)