Interface RelayNetworkStatus
- All Superinterfaces:
Descriptor
,Serializable
Directory authorities in the (outdated) version 2 of the directory
protocol published signed network status documents. Each network
status listed, for every relay in the network
(NetworkStatusEntry
): a hash of its identity key, a hash of its
most recent server descriptor, and a summary of what the authority
believed about its status.
Clients would download the authorities' network status documents in turn, and believe statements about routers iff they were attested to by more than half of the authorities.
Network status documents in the version 2 directory protocol
supersede signed directories in the version 1 directory protocol
(RelayDirectory
) and have been superseded by network status
consensuses (RelayNetworkStatusConsensus
) in the version 3
directory protocol.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsStatusEntry
(String fingerprint) Return whether a status entry with the given relay fingerprint (SHA-1 digest of the server's public identity key, encoded as 40 upper-case hexadecimal characters) exists; convenience method forgetStatusEntries().containsKey(fingerprint)
.Return the authority's primary IPv4 address in dotted-quad format, or null if the descriptor does not contain an address.Return the contact information for this authority, which may contain non-ASCII characters.Return the SHA-1 status digest, encoded as 40 lower-case hexadecimal characters, that the directory authority used to sign the network status.Return the directory signature string made with the authority's identity key.Return the set of flags that this directory assigns to relays, or null if the status does not assign such flags.int
Return the TCP port where this authority accepts directory-related HTTP connections, or 0 if the authority does not accept such connections.Return the RSA-1024 public key in PEM format used by this authority as long-term identity key and to sign network statuses.Return a SHA-1 digest of the authority's public identity key, encoded as 40 upper-case hexadecimal characters, which is also used to sign network statuses.Return the authority's hostname.int
Return the document format version of this descriptor which is 2.Return the authority's nickname consisting of 1 to 19 alphanumeric characters.long
Return the time in milliseconds since the epoch when this descriptor was published.Return recommended Tor versions for client usage, or null if the authority does not recommend client versions.Return recommended Tor versions for server usage, or null if the authority does not recommend server versions.Return status entries for each contained server, with map keys being SHA-1 digests of the servers' public identity keys, encoded as 40 upper-case hexadecimal characters.getStatusEntry
(String fingerprint) Return a status entry by relay fingerprint (SHA-1 digest of the server's public identity key, encoded as 40 upper-case hexadecimal characters), or null if no such status entry exists; convenience method forgetStatusEntries().get(fingerprint)
.Methods inherited from interface org.torproject.descriptor.Descriptor
getAnnotations, getDescriptorFile, getRawDescriptorBytes, getRawDescriptorLength, getUnrecognizedLines
-
Method Details
-
getNetworkStatusVersion
int getNetworkStatusVersion()Return the document format version of this descriptor which is 2.- Since:
- 1.0.0
-
getHostname
String getHostname()Return the authority's hostname.- Since:
- 1.0.0
-
getAddress
String getAddress()Return the authority's primary IPv4 address in dotted-quad format, or null if the descriptor does not contain an address.- Since:
- 1.0.0
-
getDirport
int getDirport()Return the TCP port where this authority accepts directory-related HTTP connections, or 0 if the authority does not accept such connections.- Since:
- 1.0.0
-
getFingerprint
String getFingerprint()Return a SHA-1 digest of the authority's public identity key, encoded as 40 upper-case hexadecimal characters, which is also used to sign network statuses.- Since:
- 1.0.0
-
getContactLine
String getContactLine()Return the contact information for this authority, which may contain non-ASCII characters.- Since:
- 1.0.0
-
getDirSigningKey
String getDirSigningKey()Return the RSA-1024 public key in PEM format used by this authority as long-term identity key and to sign network statuses.- Since:
- 1.0.0
-
getRecommendedServerVersions
Return recommended Tor versions for server usage, or null if the authority does not recommend server versions.- Since:
- 1.0.0
-
getRecommendedClientVersions
Return recommended Tor versions for client usage, or null if the authority does not recommend client versions.- Since:
- 1.0.0
-
getPublishedMillis
long getPublishedMillis()Return the time in milliseconds since the epoch when this descriptor was published.- Since:
- 1.0.0
-
getDirOptions
Return the set of flags that this directory assigns to relays, or null if the status does not assign such flags.- Since:
- 1.0.0
-
getStatusEntries
SortedMap<String,NetworkStatusEntry> getStatusEntries()Return status entries for each contained server, with map keys being SHA-1 digests of the servers' public identity keys, encoded as 40 upper-case hexadecimal characters.- Since:
- 1.0.0
-
containsStatusEntry
Return whether a status entry with the given relay fingerprint (SHA-1 digest of the server's public identity key, encoded as 40 upper-case hexadecimal characters) exists; convenience method forgetStatusEntries().containsKey(fingerprint)
.- Since:
- 1.0.0
-
getStatusEntry
Return a status entry by relay fingerprint (SHA-1 digest of the server's public identity key, encoded as 40 upper-case hexadecimal characters), or null if no such status entry exists; convenience method forgetStatusEntries().get(fingerprint)
.- Since:
- 1.0.0
-
getNickname
String getNickname()Return the authority's nickname consisting of 1 to 19 alphanumeric characters.- Since:
- 1.0.0
-
getDirectorySignature
String getDirectorySignature()Return the directory signature string made with the authority's identity key.- Since:
- 1.0.0
-
getDigestSha1Hex
String getDigestSha1Hex()Return the SHA-1 status digest, encoded as 40 lower-case hexadecimal characters, that the directory authority used to sign the network status.- Since:
- 1.7.0
-