class Selenium::Server

def net_http

def net_http
  http_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY']
  if http_proxy
    http_proxy = "http://#{http_proxy}" unless http_proxy.start_with?('http://')
    uri = URI.parse(http_proxy)
    Net::HTTP::Proxy(uri.host, uri.port)
  else
    Net::HTTP
  end
end