ProxyUtilities
Gem to get lists of Proxies and check them if they are still available.
Installation
Add this line to your application's Gemfile:
gem 'proxy_utilities'
And then execute:
$ bundle
Or install it yourself as:
$ gem install proxy_utilities
Usage
This gem has two features at the moment:
- Get a list of proxies.
- Check if a proxy is available
Getter
list = ProxyUtilities.get_proxies
Checker
This module checks if the proxy can reach a website over the proxy, also additional websites can be enabled.
checked_proxy = ProxyUtilities.check_proxy("0.0.0.0", 80)
also working:
checked_proxy = ProxyUtilities.check_proxy("0.0.0.0", "80")
Following additional attributes are supported:
checked_proxy = ProxyUtilities.check_proxy("0.0.0.0", 80, check_websites: true)
checked_proxy = ProxyUtilities.check_proxy("0.0.0.0", 80, check_websites: true, webistes: ["https://github.com/ruby-matze/proxy_utilities"])
Checking full lists of proxies like:
list = [{{:ip => "0.0.0.0", :port => 80, ...}, ...]
checked_proxy = ProxyUtilities.check_proxy_list(list, check_websites: true, webistes: ["https://github.com/ruby-matze/proxy_utilities"])
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby-matze/proxy_utilities.
License
The gem is available as open source under the terms of the MIT License.