I’m interested in writing a ruby program that uses sockets via a proxy.
lib/resolv-replace.rb appears to have the beginnings of the code that I
would want to use, however, it appears to be unfinished or at least not
here is a clip from the file resolv-replace.rb
class SOCKSSocket < TCPSocket
alias original_resolv_initialize initialize
def initialize(host, serv)
end if defined? SOCKSSocket
I get the feeling that the intention is at some future point
resolv-replace.rb will overwrite or replace the file resolv.rb and
SOCKSSocket will use native c method calls, etc.
I need to know if I am completely off base here and if so it would be
great to see some working examples using SOCKSSocket.