Class: Spior::Tor::Data
- Inherits:
-
Object
- Object
- Spior::Tor::Data
- Defined in:
- lib/spior/tor/data.rb
Overview
Data Fill Spior::CONFIG with data found on ‘/etc/tor/torrc` or set default.
Attributes
-
user
- Username used by Tor on your distro, e.g ‘tor’ on Archlinux -
dns_port
- Open this port to listen for UDP DNS requests, and resolve them anonymously -
uid
- The uid value from the user attribute. -
trans_port
- Port to open to listen for transparent proxy connections. -
virt_addr
- Default use ‘10.192.0.0/10’.
Instance Attribute Summary collapse
-
#dns_port ⇒ Object
Returns the value of attribute dns_port.
-
#trans_port ⇒ Object
Returns the value of attribute trans_port.
-
#uid ⇒ Object
Returns the value of attribute uid.
-
#user ⇒ Object
Returns the value of attribute user.
-
#virt_addr ⇒ Object
Returns the value of attribute virt_addr.
Instance Method Summary collapse
-
#initialize ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize ⇒ Data
Returns a new instance of Data.
22 23 24 25 26 27 28 |
# File 'lib/spior/tor/data.rb', line 22 def initialize @user = search('User') || 'tor' @dns_port = search('DNSPort') || '9061' @trans_port = search('TransPort') || '9040' @virt_addr = search('VirtualAddrNetworkIPv4') || '10.192.0.0/10' @uid = search_uid || 0 end |
Instance Attribute Details
#dns_port ⇒ Object
Returns the value of attribute dns_port.
20 21 22 |
# File 'lib/spior/tor/data.rb', line 20 def dns_port @dns_port end |
#trans_port ⇒ Object
Returns the value of attribute trans_port.
20 21 22 |
# File 'lib/spior/tor/data.rb', line 20 def trans_port @trans_port end |
#uid ⇒ Object
Returns the value of attribute uid.
20 21 22 |
# File 'lib/spior/tor/data.rb', line 20 def uid @uid end |
#user ⇒ Object
Returns the value of attribute user.
20 21 22 |
# File 'lib/spior/tor/data.rb', line 20 def user @user end |
#virt_addr ⇒ Object
Returns the value of attribute virt_addr.
20 21 22 |
# File 'lib/spior/tor/data.rb', line 20 def virt_addr @virt_addr end |