Lookingglass/shodan-ruby — pull request #3 by calveto (2014-01-20 19:31:47+00:00)
Title: ENV['HTTP_PROXY']

The Shodan gem was not respecting the HTTP_PROXY env. These changes now add support for that env setting.

I tested this via the few rspec test to make sure I didn't break existing functionality. Note I added the sleep, since the Shodan API will error if we make more then 1 request per second.

* Confirmed it works with no proxy settings and going straight to Shodan.
* Confirmed it works when the base_url points to https://lgproxy.lgscout.com (test proxy on bebop)
* Confirmed it works when setting HTTP_PROXY to a proxy running on my localhost (http://localhost:8888) Using Squidman

* I don't have an HTTPS proxy to test with, but I'm fairly confident it will work, since I'm doing the same thing for the other https connections.

@markolson Want to have a look?