Package org.torproject.descriptor
Interface NetworkStatusEntry
- All Superinterfaces:
Serializable
Contains an entry in a network status in the version 2 or 3 directory
protocol or in a bridge network status.
A network status entry is not a descriptor type of its own but is
part of a network status in the version 2 directory protocol
(RelayNetworkStatus
), a vote (RelayNetworkStatusVote
)
or flavored/unflavored consensus (@link RelayNetworkStatusConsensus})
in the version 3 directory protocol, or a bridge network status
(BridgeNetworkStatus
). Entries in signed directories in the
version 1 directory protocol are represented by router status entries
(RouterStatusEntry
).
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionReturn the server's primary IPv4 address in dotted-quad format.long
Return the bandwidth weight of this server or -1 if the status entry didn't contain a bandwidth line.Return the default policy of the port summary, which can be either"accept"
or"reject"
, or null if the status entry didn't contain an exit policy summary.Return the SHA-1 digest of the server descriptor, or null if the containing network status does not contain server descriptor references, like a microdesc consensus.int
Return the TCP port where this server accepts directory-related HTTP connections.Return a SHA-1 digest of the server's identity key, encoded as 40 upper-case hexadecimal characters.getFlags()
Return the relay flags assigned to this server, or null if the status entry didn't contain any relay flags.Return the server's Ed25519 master key, encoded as 43 base64 characters without padding characters, "none" if the relay doesn't have an Ed25519 identity, or null if the status entry didn't contain this information or if the status is not a vote.long
Return the measured bandwidth or -1 if the status entry either didn't contain bandwidth information or didn't contain an indication that this information is based on measured bandwidth.Return the (possibly empty) set of microdescriptor digests, encoded as 43 base64 characters without padding characters, if the containing network status is a vote or microdesc consensus, or null otherwise.Return the server nickname consisting of 1 to 19 alphanumeric characters.Return additional IP addresses and TCP ports where this server accepts TLS connections for the main OR protocol, or an empty list if the network status doesn't contain any such additional addresses and ports.int
Return the TCP port where this server accepts TLS connections for the main OR protocol.Return the list of ports or port intervals of the exit port summary, or null if the status entry didn't contain an exit policy summary.Return the version numbers of all protocols supported by this server, or null if the status entry does not specify supported protocol versions.long
Return the time in milliseconds since the epoch when this descriptor was published.getStats()
Return the various statistics that an authority has computed for this relay.byte[]
Return the raw network status entry bytes.Return the server's supported consensus methods, or null if the status entry didn't contain this information or if the status is not a vote.boolean
Return whether the status entry is yet unmeasured by the bandwidth authorities; only included in consensuses using method 17 or higher.Return the Tor software version, or null if the status entry didn't contain version information.
-
Method Details
-
getStatusEntryBytes
byte[] getStatusEntryBytes()Return the raw network status entry bytes.- Since:
- 1.0.0
-
getNickname
String getNickname()Return the server nickname consisting of 1 to 19 alphanumeric characters.- Since:
- 1.0.0
-
getFingerprint
String getFingerprint()Return a SHA-1 digest of the server's identity key, encoded as 40 upper-case hexadecimal characters.- Since:
- 1.0.0
-
getDescriptor
String getDescriptor()Return the SHA-1 digest of the server descriptor, or null if the containing network status does not contain server descriptor references, like a microdesc consensus.- Since:
- 1.0.0
-
getPublishedMillis
long getPublishedMillis()Return the time in milliseconds since the epoch when this descriptor was published.- Since:
- 1.0.0
-
getAddress
String getAddress()Return the server's primary IPv4 address in dotted-quad format.- Since:
- 1.0.0
-
getOrPort
int getOrPort()Return the TCP port where this server accepts TLS connections for the main OR protocol.- Since:
- 1.0.0
-
getDirPort
int getDirPort()Return the TCP port where this server accepts directory-related HTTP connections.- Since:
- 1.0.0
-
getMicrodescriptorDigestsSha256Base64
Return the (possibly empty) set of microdescriptor digests, encoded as 43 base64 characters without padding characters, if the containing network status is a vote or microdesc consensus, or null otherwise.- Since:
- 1.7.0
-
getOrAddresses
Return additional IP addresses and TCP ports where this server accepts TLS connections for the main OR protocol, or an empty list if the network status doesn't contain any such additional addresses and ports.- Since:
- 1.0.0
-
getFlags
Return the relay flags assigned to this server, or null if the status entry didn't contain any relay flags.- Since:
- 1.0.0
-
getVersion
String getVersion()Return the Tor software version, or null if the status entry didn't contain version information.- Since:
- 1.0.0
-
getProtocols
Return the version numbers of all protocols supported by this server, or null if the status entry does not specify supported protocol versions.- Since:
- 1.6.0
-
getStats
Return the various statistics that an authority has computed for this relay. Each stats is represented as a key + value.- Since:
- 2.20.0
-
getBandwidth
long getBandwidth()Return the bandwidth weight of this server or -1 if the status entry didn't contain a bandwidth line.- Since:
- 1.0.0
-
getMeasured
long getMeasured()Return the measured bandwidth or -1 if the status entry either didn't contain bandwidth information or didn't contain an indication that this information is based on measured bandwidth.- Since:
- 1.0.0
-
getUnmeasured
boolean getUnmeasured()Return whether the status entry is yet unmeasured by the bandwidth authorities; only included in consensuses using method 17 or higher.- Since:
- 1.0.0
-
getDefaultPolicy
String getDefaultPolicy()Return the default policy of the port summary, which can be either"accept"
or"reject"
, or null if the status entry didn't contain an exit policy summary.- Since:
- 1.0.0
-
getPortList
String getPortList()Return the list of ports or port intervals of the exit port summary, or null if the status entry didn't contain an exit policy summary.- Since:
- 1.0.0
-
getMasterKeyEd25519
String getMasterKeyEd25519()Return the server's Ed25519 master key, encoded as 43 base64 characters without padding characters, "none" if the relay doesn't have an Ed25519 identity, or null if the status entry didn't contain this information or if the status is not a vote.- Since:
- 1.1.0
-
getSupportedConsensusMethods
String getSupportedConsensusMethods()Return the server's supported consensus methods, or null if the status entry didn't contain this information or if the status is not a vote.- Since:
- 1.2.20
-