philnash / pwned

😱 An easy, Ruby way to use the Pwned Passwords API.
https://rubygems.org/gems/pwned/
MIT License
426 stars 22 forks source link

Support the ability to specify a proxy #21

Closed dparpyani closed 3 years ago

dparpyani commented 3 years ago

Currently, it seems that the only way to specify a proxy is to use the http_proxy environment variable. Net::HTTP looks for this variable, unless one is explicitly passed in to the call to Net::HTTP.new or Net::HTTP.start.

Unfortunately, this does not work well if you only want to specify a proxy for the pwned gem, without affecting other net-http connections in an app. Is there a plan to support passing the proxy during initialization or via some other way?

philnash commented 3 years ago

I had no plans for it myself, but I'll happily take pull requests for this feature, if it's something you need.

dparpyani commented 3 years ago

Great, thanks! I'll open one in a bit.

philnash commented 3 years ago

Thanks for the PR. It was merged and released as version 2.2.0.