# File lib/proxifier/proxy.rb, line 23 def open(host, port, local_host = nil, local_port = nil) return TCPSocket.new(host, port, local_host, local_port) unless proxify?(host) socket = TCPSocket.new(self.host, self.port, local_host, local_port) begin proxify(socket, host, port) rescue socket.close raise end socket end