# File lib/proxifier/env.rb, line 30
    def initialize_with_proxy(host, port, options_or_local_host = {}, local_port = nil, options_if_local_host = {})
      if options_or_local_host.is_a?(Hash)
        local_host = nil
        options = options_or_local_host
      else
        local_host = options_or_local_host
        options = options_if_local_host
      end

      if options[:proxy] && (proxy = Proxifier::Proxy(options.delete(:proxy), options)) && proxy.proxify?(host)
        initialize_without_proxy(proxy.host, proxy.port, local_host, local_port)
        begin
          proxy.proxify(self, host, port)
        rescue
          close
          raise
        end
      else
        initialize_without_proxy(host, port, local_host, local_port)
      end
    end