class Net::SSH::Proxy::SOCKS5

def negotiate_password(socket)

Simple username/password negotiation with the SOCKS5 server.
def negotiate_password(socket)
  packet = [0x01, options[:user].length, options[:user],
            options[:password].length, options[:password]].pack("CCA*CA*")
  socket.send packet, 0
  version, status = socket.recv(2).unpack("CC")
  if status != SUCCESS
    socket.close
    raise UnauthorizedError, "could not authorize user"
  end
end