def set_proxy(proxy_server_and_port = "")
      begin
        @proxy = URI.parse("http://"+((proxy_server_and_port.empty?) ? ENV['HTTP_PROXY'] : string_proxy))
        @http = Net::HTTP::Proxy(@proxy.host, @proxy.port)
      rescue
        @proxy = nil
        @http = Net::HTTP
      end
    end
def set_proxy(proxy_server_and_port = "")
      begin
        @proxy = URI.parse("http://"+((proxy_server_and_port.empty?) ? ENV['HTTP_PROXY'] : string_proxy))
        @http = Net::HTTP::Proxy(@proxy.host, @proxy.port)
      rescue
        @proxy = nil
        @http = Net::HTTP
      end
    end
Specify where your AirVideo Server lives. If your HTTP_PROXY environment variable is set, it will be honoured.

 At the moment I'm expecting ENV['HTTP_PROXY'] to have the form 'sub.domain.com:8080', I throw an http:// and bung it into URI.parse for convenience.
 Potentially confusing:
 * Sending 'server:port' will use that address as an HTTP proxy
 * An empty string (or something not recognisable as a URL with http:// put infront of it) will try to use the ENV['HTTP_PROXY'] variable
 * Sending nil or any object that can't be parsed to a string will remove the proxy

 NB. You can access the @proxy URI object externally, but changing it will *not* automatically call set_proxy