class Excon::Connection

def proxy_match_host_port(host, port)

def proxy_match_host_port(host, port)
    host_match = if host.is_a? IPAddr
                   begin
                     host.include? @data[:host]
                   rescue IPAddr::Error
                     false
                   end
                 else
                   /(^|\.)#{host}$/.match(@data[:host])
                 end
    host_match && (port.nil? || port.to_i == @data[:port])
end