Package org.torproject.descriptor
Interface Microdescriptor
-
- All Superinterfaces:
Descriptor
,java.io.Serializable
public interface Microdescriptor extends Descriptor
Contains a relay microdescriptor.A microdescriptor is a stripped-down version of a relay server descriptor (
RelayServerDescriptor
) generated by the directory authorities by extracting and/or transforming relay server descriptor contents following strict rules without adding the authority's opinion about the relay. Microdescriptors are referenced from microdescriptor consensuses (RelayNetworkStatusConsensus
) and downloaded by clients to make path-selection decisions and to build circuits. Microdescriptors contain only the most relevant parts that clients care about. Microdescriptors are expected to be relatively static and only change about once per week.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getDefaultPolicy()
Return the default policy,"accept"
or"reject"
, of the IPv4 port summary, or null if the descriptor didn't contain an IPv4 exit-policy summary line which is equivalent to rejecting all streams to IPv4 targets.java.lang.String
getDigestSha256Base64()
Return the SHA-256 descriptor digest, encoded as 43 base64 characters without padding characters, that is used to reference this descriptor from a vote or microdescriptor consensus.java.lang.String
getDigestSha256Hex()
Return the SHA-256 descriptor digest, encoded as 64 lower-case hexadecimal characters, that can be used as file name when writing this descriptor to disk.java.lang.String
getEd25519Identity()
Return a SHA-256 digest of the server's Ed25519 identity key, encoded as 43 base64 characters without padding characters, that is only included to prevent collisions between microdescriptors, or null if no such digest is included.java.util.List<java.lang.String>
getFamilyEntries()
Return nicknames, $-prefixed identity fingerprints, or tuples of the format$fingerprint=nickname
or$fingerprint~nickname
of servers contained in this server's family, or null if the descriptor does not contain a family line.java.lang.String
getIpv6DefaultPolicy()
Return the default policy,"accept"
or"reject"
, of the IPv6 port summary, or null if the descriptor didn't contain an IPv6 exit-policy summary line which is equivalent to rejecting all streams to IPv6 targets.java.lang.String
getIpv6PortList()
Return the port list of the IPv6 exit-policy summary, or null if the descriptor didn't contain an IPv6 exit-policy summary line which is equivalent to rejecting all streams to IPv6 targets.java.lang.String
getNtorOnionKey()
Return the curve25519 public key, encoded as 43 base64 characters without padding characters, that is used for the ntor circuit extended handshake, or null if the descriptor didn't contain an ntor-onion-key line.java.lang.String
getOnionKey()
Return the RSA-1024 public key in PEM format used to encrypt CREATE cells for this server, or null if the descriptor doesn't contain an onion key.java.util.List<java.lang.String>
getOrAddresses()
Return IP addresses and TCP ports where this server accepts TLS connections for the main OR protocol, or an empty list if the server does not support additional addresses or ports; entries are given in the order as they are listed in the descriptor; IPv4 addresses are given in dotted-quad format, IPv6 addresses use the colon-separated hexadecimal format surrounded by square brackets, and TCP ports are separated from the IP address using a colon.java.lang.String
getPortList()
Return the port list of the IPv4 exit-policy summary, or null if the descriptor didn't contain an IPv4 exit-policy summary line which is equivalent to rejecting all streams to IPv4 targets.java.lang.String
getRsa1024Identity()
Return a SHA-1 digest of the server's RSA-1024 identity key, encoded as 27 base64 characters without padding characters, that is only included to prevent collisions between microdescriptors, or null if no such digest is included.-
Methods inherited from interface org.torproject.descriptor.Descriptor
getAnnotations, getDescriptorFile, getRawDescriptorBytes, getRawDescriptorLength, getUnrecognizedLines
-
-
-
-
Method Detail
-
getDigestSha256Base64
java.lang.String getDigestSha256Base64()
Return the SHA-256 descriptor digest, encoded as 43 base64 characters without padding characters, that is used to reference this descriptor from a vote or microdescriptor consensus.- Since:
- 1.7.0
-
getDigestSha256Hex
java.lang.String getDigestSha256Hex()
Return the SHA-256 descriptor digest, encoded as 64 lower-case hexadecimal characters, that can be used as file name when writing this descriptor to disk.- Since:
- 2.15.0
-
getOnionKey
java.lang.String getOnionKey()
Return the RSA-1024 public key in PEM format used to encrypt CREATE cells for this server, or null if the descriptor doesn't contain an onion key.- Since:
- 1.0.0
-
getNtorOnionKey
java.lang.String getNtorOnionKey()
Return the curve25519 public key, encoded as 43 base64 characters without padding characters, that is used for the ntor circuit extended handshake, or null if the descriptor didn't contain an ntor-onion-key line.- Since:
- 1.0.0
-
getOrAddresses
java.util.List<java.lang.String> getOrAddresses()
Return IP addresses and TCP ports where this server accepts TLS connections for the main OR protocol, or an empty list if the server does not support additional addresses or ports; entries are given in the order as they are listed in the descriptor; IPv4 addresses are given in dotted-quad format, IPv6 addresses use the colon-separated hexadecimal format surrounded by square brackets, and TCP ports are separated from the IP address using a colon.- Since:
- 1.0.0
-
getFamilyEntries
java.util.List<java.lang.String> getFamilyEntries()
Return nicknames, $-prefixed identity fingerprints, or tuples of the format$fingerprint=nickname
or$fingerprint~nickname
of servers contained in this server's family, or null if the descriptor does not contain a family line.- Since:
- 1.0.0
-
getDefaultPolicy
java.lang.String getDefaultPolicy()
Return the default policy,"accept"
or"reject"
, of the IPv4 port summary, or null if the descriptor didn't contain an IPv4 exit-policy summary line which is equivalent to rejecting all streams to IPv4 targets.- Since:
- 1.0.0
-
getPortList
java.lang.String getPortList()
Return the port list of the IPv4 exit-policy summary, or null if the descriptor didn't contain an IPv4 exit-policy summary line which is equivalent to rejecting all streams to IPv4 targets.- Since:
- 1.0.0
-
getIpv6DefaultPolicy
java.lang.String getIpv6DefaultPolicy()
Return the default policy,"accept"
or"reject"
, of the IPv6 port summary, or null if the descriptor didn't contain an IPv6 exit-policy summary line which is equivalent to rejecting all streams to IPv6 targets.- Since:
- 1.0.0
-
getIpv6PortList
java.lang.String getIpv6PortList()
Return the port list of the IPv6 exit-policy summary, or null if the descriptor didn't contain an IPv6 exit-policy summary line which is equivalent to rejecting all streams to IPv6 targets.- Since:
- 1.0.0
-
getRsa1024Identity
java.lang.String getRsa1024Identity()
Return a SHA-1 digest of the server's RSA-1024 identity key, encoded as 27 base64 characters without padding characters, that is only included to prevent collisions between microdescriptors, or null if no such digest is included.- Since:
- 1.1.0
-
getEd25519Identity
java.lang.String getEd25519Identity()
Return a SHA-256 digest of the server's Ed25519 identity key, encoded as 43 base64 characters without padding characters, that is only included to prevent collisions between microdescriptors, or null if no such digest is included.- Since:
- 1.1.0
-
-