module TorControl::Info

Defined in:

get_info.cr

Constant Summary

Address = "address"

the best guess at our external IP address. If we have no guess, return a 551 error.

AddressV4 = "address/v4"

the best guess at our respective external IPv4 address. If we have no guess, return a 551 error.

AddressV6 = "address/v6"

the best guess at our respective external IPv6 address. If we have no guess, return a 551 error.

BwEventCache = "bw-event-cache"

A space-separated summary of recent BW events in chronological order from oldest to newest. Each event is represented by a comma-separated tuple of "R,W", R is the number of bytes read, and W is the number of bytes written. These entries each represent about one second's worth of traffic.

DescAllRecent = "desc/all-recent"

the latest server descriptor for every router that Tor knows about. (See md note about "desc/id" and "desc/name" above.)

DescDownloadEnabled = "desc/download-enabled"

"1" if we try to download router descriptors; "0" otherwise.

Dormant = "dormant"

A nonnegative integer: zero if Tor is currently active and building circuits, and nonzero if Tor has gone idle due to lack of use or some similar reason.

EntryGuards = "entry-guards"

A series of lines listing the currently chosen entry guards, if any.

EventsNames = "events/names"

A space-separated list of all the events supported by this version of Tor's SETEVENTS.

FeaturesNames = "features/names"

A space-separated list of all the features supported by this version of Tor's USEFEATURE.

Fingerprint = "fingerprint"

the contents of the fingerprint file that Tor writes as a relay, or a 551 if we're not a relay currently.

InfoNames = "info/names"

A series of lines listing the available GETINFO options.

IpToCountryIpv4Available = "ip-to-country/ipv4-available"

"1" if the relevant geoip or geoip6 database is present; "0" otherwise.

IpToCountryIpv6Available = "ip-to-country/ipv6-available"

"1" if the relevant geoip or geoip6 database is present; "0" otherwise.

LimitsMaxMemInQueues = "limits/max-mem-in-queues"

The amount of memory that Tor's out-of-memory checker will allow Tor to allocate (in places it can see) before it starts freeing memory and killing circuits. See the MaxMemInQueues option for more details. Unlike the option, this value reflects Tor's actual limit, and may be adjusted depending on the available system memory rather than on the MaxMemInQueues option.

MdAll = "md/all"

all known microdescriptors for the entire Tor network. Each microdescriptor is terminated by a newline.

MdDownloadEnabled = "md/download-enabled"

"1" if we try to download microdescriptors; "0" otherwise.

NetworkLiveness = "network-liveness"
NsAll = "ns/all"

Router status info (v3 directory style) for all ORs we that the consensus has an opinion about, joined by newlines.

OrconnStatus = "orconn-status"

A series of lines as for a stream status event.

SignalNames = "signal/names"

A space-separated list of all the values supported by the SIGNAL command.

StreamStatus = "stream-status"

A series of lines as for a circuit status event. circuitStatus = "circuit-status"

Uptime = "uptime"

Uptime of the Tor daemon (in seconds).

Version = "version"

The version of the server's software.

Class Method Summary

Class Method Detail

def self.ip_to_country(address) #

Maps IP addresses to 2-letter country codes. For example, Info.ip_to_country("18.0.0.1") should give "US".