Interface RelayNetworkStatus
-
- All Superinterfaces:
Descriptor
,java.io.Serializable
public interface RelayNetworkStatus extends Descriptor
Contains a network status document in the version 2 directory protocol.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsStatusEntry(java.lang.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)
.java.lang.String
getAddress()
Return the authority's primary IPv4 address in dotted-quad format, or null if the descriptor does not contain an address.java.lang.String
getContactLine()
Return the contact information for this authority, which may contain non-ASCII characters.java.lang.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.java.lang.String
getDirectorySignature()
Return the directory signature string made with the authority's identity key.java.util.SortedSet<java.lang.String>
getDirOptions()
Return the set of flags that this directory assigns to relays, or null if the status does not assign such flags.int
getDirport()
Return the TCP port where this authority accepts directory-related HTTP connections, or 0 if the authority does not accept such connections.java.lang.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.java.lang.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.java.lang.String
getHostname()
Return the authority's hostname.int
getNetworkStatusVersion()
Return the document format version of this descriptor which is 2.java.lang.String
getNickname()
Return the authority's nickname consisting of 1 to 19 alphanumeric characters.long
getPublishedMillis()
Return the time in milliseconds since the epoch when this descriptor was published.java.util.List<java.lang.String>
getRecommendedClientVersions()
Return recommended Tor versions for client usage, or null if the authority does not recommend client versions.java.util.List<java.lang.String>
getRecommendedServerVersions()
Return recommended Tor versions for server usage, or null if the authority does not recommend server versions.java.util.SortedMap<java.lang.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.NetworkStatusEntry
getStatusEntry(java.lang.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 Detail
-
getNetworkStatusVersion
int getNetworkStatusVersion()
Return the document format version of this descriptor which is 2.- Since:
- 1.0.0
-
getHostname
java.lang.String getHostname()
Return the authority's hostname.- Since:
- 1.0.0
-
getAddress
java.lang.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
java.lang.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
java.lang.String getContactLine()
Return the contact information for this authority, which may contain non-ASCII characters.- Since:
- 1.0.0
-
getDirSigningKey
java.lang.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
java.util.List<java.lang.String> getRecommendedServerVersions()
Return recommended Tor versions for server usage, or null if the authority does not recommend server versions.- Since:
- 1.0.0
-
getRecommendedClientVersions
java.util.List<java.lang.String> 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
java.util.SortedSet<java.lang.String> 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
java.util.SortedMap<java.lang.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
boolean containsStatusEntry(java.lang.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)
.- Since:
- 1.0.0
-
getStatusEntry
NetworkStatusEntry getStatusEntry(java.lang.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)
.- Since:
- 1.0.0
-
getNickname
java.lang.String getNickname()
Return the authority's nickname consisting of 1 to 19 alphanumeric characters.- Since:
- 1.0.0
-
getDirectorySignature
java.lang.String getDirectorySignature()
Return the directory signature string made with the authority's identity key.- Since:
- 1.0.0
-
getDigestSha1Hex
java.lang.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
-
-