This allows all the whois connections to be routed via a SOCKS server. Socksify is arguably invasive since it monkeypatches TCPSocket hence require'ing it lazily.
Add SOCKS support via socksify gem
I can't accept this pull request because there are no tests associated.
Moreover, in this version I introduced the ability to pass a custom query handler to perform socket requests. The best way to implement this feature is by creating a new query handler, instead of changing the logic of the query method.