Using the socksify gem with Tor to visit a webpage

Installation

Example

require 'socksify/http'

uri = URI.parse('http://www.jamesrobertson.eu/health/')
r = Net::HTTP.SOCKSProxy('127.0.0.1', 9150).start(uri.host, uri.port) do |http|
  http.get(uri.path)
end

The above example uses the socksify gem to access a webpage through Tor.

Resources