Yeah well, did some more research, appears to be that with SOCKS5 you don't have to resolve the domain by yourself, you just have to pass it to it and it will do its job.
Made it a bit more modular, now it's a lot easier to implement SOCKS4 if wanted.
Please merge and make a new gem version.
Ran the spec succesfully both on MRI 1.8 and MRI 1.9 and my tor2web implementation works flawlessly.
If you want to add me to the AUTHORS or something it would be appreciated, but really doesn't matter :)
Major rewrite, now works with TOR and does not leak DNS queries
Some minor code cleanup
Small bugfix for 1.8
Avoid name scope problems.
Why do we need this, and the remove_instance_variable code below?
Well, I thought cleaning up the instance variables after we're done would remove some not needed data.
Wouldn't those variables stay there even when we don't need them anymore?
Removing the method is a no_op, and same applies for the instance variables: we do this right before calling the error callback, which means the object will likely get GC'ed shortly anyway.
socks5: use #slice instead of #
Hmm, not sure why GH didn't auto close this.. merged. Thanks!
Thank you for merging :)