- Notifications
You must be signed in to change notification settings - Fork22
Tor.rb is a Ruby library for interacting with the Tor anonymity network.
License
dryruby/tor.rb
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is a Ruby library for interacting with theTor anonymity network.
- Supports checking whether Tor is installed in the user's current
PATH,and if it is, returning the version number. - Supports parsing Tor configuration files and looking up the values ofparticular options.
- Supports querying and controlling a locally-running Tor process using theTor Control Protocol (TC) over a socket connection.
- Supports querying theTor DNS Exit List (DNSEL) to determinewhether a particular host is a Tor exit node or not.
- Compatible with Ruby 1.8.7+, Ruby 1.9.x, and JRuby 1.4/1.5.
require 'rubygems'require 'tor'Tor.available? #=> trueTor.version #=> "0.2.1.25"torrc = Tor::Config.load("/etc/tor/torrc")Tor::Config.open("/etc/tor/torrc") do |torrc| puts "Tor SOCKS port: #{torrc['SOCKSPort']}" puts "Tor control port: #{torrc['ControlPort']}" puts "Tor exit policy:" torrc.each('ExitPolicy') do |key, value| puts " #{value}" endendTor::Controller.connect(:port => 9051) do |tor| puts "Tor version: #{tor.version}" puts "Tor config file: #{tor.config_file}"endTor::DNSEL.include?("185.220.101.21") #=> trueTor::DNSEL.include?("1.2.3.4") #=> falseThe recommended installation method is viaRubyGems.To install the latest official release of Tor.rb, do:
% [sudo] gem install tor # Ruby 1.8.7+ or 1.9.x% [sudo] gem install backports tor # Ruby 1.8.1+To get a local working copy of the development repository, do:
% git clone git://github.com/bendiken/tor-ruby.gitAlternatively, you can download the latest development version as a tarballas follows:
% wget http://github.com/bendiken/tor-ruby/tarball/masterTor.rb is free and unencumbered public domain software. For moreinformation, seehttp://unlicense.org/ or the accompanying UNLICENSE file.
About
Tor.rb is a Ruby library for interacting with the Tor anonymity network.
Topics
Resources
License
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.