title: Automatically adding proxy to all HTTP connections in ruby
body: <p>I have an application that initiates multiple <code>HTTP</code> connections and I would like to add a proxy to all connections.</p>
  
  <p>The application is using <code>net/HTTP</code>, <code>TCP</code> sockets and <code>open-uri</code> so ideally I would like to be able to patch all connections initiated from those libraries instead of adding it manually to each and every location in the code that initiates a connection.</p>
  
  <p>Is there a way to accomplish that (on <code>Ruby 1.9.2</code>)?</p>