Package org.torproject.descriptor
Interface Microdescriptor
- All Superinterfaces:
Descriptor
,Serializable
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
Modifier and TypeMethodDescriptionReturn 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.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.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.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.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.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.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.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.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.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.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.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 Details
-
getDigestSha256Base64
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
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
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
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
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
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
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
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
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
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
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
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
-