Package org.torproject.descriptor

Interfaces and essential classes for obtaining and processing Tor descriptors.

This package contains all relevant interfaces and classes that an application would need to use this library. Applications are strongly discouraged from accessing types from the implementation package (org.torproject.descriptor.impl) directly, because those may change without prior notice.

Interfaces and classes in this package can be grouped into general-purpose types to obtain and process any type of descriptor and descriptors produced by different components of the Tor network:

  1. General-purpose types comprise DescriptorSourceFactory which is the main entry point into using this library. This factory is used to create the descriptor sources for obtaining remote descriptor data (DescriptorCollector) and descriptor sources for processing local descriptor data (DescriptorReader and DescriptorParser). General-purpose types also include the superinterface for all provided descriptors (Descriptor).
  2. The first group of descriptors is published by relays and servers in the Tor network. These interfaces include server descriptors (ServerDescriptor with subinterfaces RelayServerDescriptor and BridgeServerDescriptor), extra-info descriptors (ExtraInfoDescriptor with subinterfaces RelayExtraInfoDescriptor and BridgeExtraInfoDescriptor), microdescriptors which are derived from server descriptors by the directory authorities (Microdescriptor), and helper types for parts of the aforementioned descriptors (BandwidthHistory).
  3. The second group of descriptors is generated by authoritative directory servers that form an opinion about relays and bridges in the Tor network. These include descriptors specified in version 3 of the directory protocol (RelayNetworkStatusConsensus, RelayNetworkStatusVote, DirectoryKeyCertificate, and helper types for descriptor parts DirSourceEntry, NetworkStatusEntry, and DirectorySignature), descriptors from earlier directory protocol version 2 (RelayNetworkStatus) and version 1 (RelayDirectory and RouterStatusEntry), as well as descriptors published by the bridge authority and sanitized by the CollecTor service (BridgeNetworkStatus).
  4. The third group of descriptors is created by auxiliary services connected to the Tor network rather than by the Tor software. This group comprises descriptors by the bridge distribution service BridgeDB (BridgePoolAssignment), the exit list service TorDNSEL (ExitList), the performance measurement service Torperf (TorperfResult), and sanitized access logs of Tor's web servers (WebServerAccessLog).
Since:
1.0.0
  • Interface Summary 
    Interface Description
    BandwidthFile
    A bandwidth file contains information on relays' bandwidth capacities and is produced by bandwidth generators, previously known as bandwidth scanners.
    BandwidthFile.RelayLine  
    BandwidthHistory
    Contains the bandwidth history of a relay or bridge.
    BridgedbMetrics
    Contains aggregated information about requests to the BridgeDB service.
    BridgeExtraInfoDescriptor
    Contains a sanitized bridge extra-info descriptor.
    BridgeNetworkStatus
    Contains a sanitized bridge network status document.
    BridgePoolAssignment
    Contains a sanitized list of bridges together with the distribution pools they have been assigned to by the bridge distribution service BridgeDB.
    BridgeServerDescriptor
    Contains a sanitized bridge server descriptor.
    Descriptor
    Superinterface for any descriptor with access to generic information about the descriptor.
    DescriptorCollector
    Descriptor source that synchronizes descriptors from the CollecTor service to a given local directory.
    DescriptorParser
    Descriptor source that parses descriptors from raw descriptor contents.
    DescriptorReader
    Descriptor source that reads descriptors from local files and provides an iterator over parsed descriptors.
    DirectoryKeyCertificate
    Contains a key certificate in the version 3 directory protocol.
    DirectorySignature
    Contains the signature of a network status consensus or vote.
    DirSourceEntry
    Contains details about an authority and its vote that contributed to a consensus.
    ExitList
    Contains an exit list containing the IP addresses of relays that the exit list service TorDNSEL found when exiting through them.
    ExitList.Entry
    Exit list entry containing results from a single exit scan.
    ExtraInfoDescriptor
    Contains a relay or sanitized bridge extra-info descriptor.
    LogDescriptor
    Contains a log file.
    LogDescriptor.Line
    Base interface for accessing log lines.
    Microdescriptor
    Contains a relay microdescriptor.
    NetworkStatusEntry
    Contains an entry in a network status in the version 2 or 3 directory protocol or in a bridge network status.
    RelayDirectory
    Contains a signed directory in the version 1 directory protocol.
    RelayExtraInfoDescriptor
    Contains a relay extra-info descriptor.
    RelayNetworkStatus
    Contains a network status document in the version 2 directory protocol.
    RelayNetworkStatusConsensus
    Contains a network status consensus in the version 3 directory protocol.
    RelayNetworkStatusVote
    Contains a network status vote in the version 3 directory protocol.
    RelayServerDescriptor
    Contains a relay server descriptor.
    RouterStatusEntry
    Contains a router status entry contained in a signed directory in the version 1 directory protocol.
    ServerDescriptor
    Contains a relay or sanitized bridge server descriptor.
    SnowflakeStats
    Contain aggregated information about snowflake proxies and snowflake clients.
    TorperfResult
    Contains performance measurement results from making simple HTTP requests over the Tor network.
    UnparseableDescriptor
    Contains a descriptor that could not be parsed.
    WebServerAccessLog
    Contains a sanitized web server access log file from a torproject.org web server.
    WebServerAccessLog.Line
    Facilitates access to all log line fields that don't only contain default values post sanitization.
  • Class Summary 
    Class Description
    DescriptorSourceFactory
    Factory for descriptor sources which in turn produce descriptors.
  • Enum Summary 
    Enum Description
    Method
    Enum for web server access log methods.
  • Exception Summary 
    Exception Description
    DescriptorParseException
    Thrown if raw descriptor contents cannot be parsed to one or more Descriptor instances, according to descriptor specifications.