HIDE MY ASS! 
Hide My Ass! fetches and connects to listed proxies at www.hidemyass.com.
This ruby gem aims to connect you anonymously, it fetches proxies from hidemyass.com and tries each one until a successful connection is made.
Installation
Add this line to your application's Gemfile:
gem 'hidemyass'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hidemyass
Usage
@uri = URI('http://www.iana.org/domains/example/')
@request = Net::HTTP::Get.new(@uri.request_uri)
@request['Referer'] = @uri.host
response = HideMyAss::HTTP.start(@uri.host, @uri.port) do |http|
http.request(@request)
end
response
=> #<Net::HTTPOK 200 OK readbody=true>
This method defaults to return on HTTPSuccess (2xx) If you want more control to follow redirections or whatever, you can retrieve the proxies list and connect manually
HideMyAss.proxies.each do |proxy|
response = Net::HTTP::Proxy(proxy[:host], proxy[:port]).start(@uri.host, @uri.port) do |http|
http.request(@request)
end
if response.class.ancestors.include?(Net::HTTPRedirection)
# ...
end
end
To try connecting through local machine before trying proxies:
HideMyAss.[:local] = true
HideMyAss::HTTP.start ...
To clear the cached proxies on every request (disabled by default):
HideMyAss.[:clear_cache] = true
or simply run:
HideMyAss.clear_cache
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request