leekspin.extrainfo

Functions for creating mock extrainfo descriptors.

generateExtraInfo(nickname, fingerprint, ts, ipv4, port, bridge=True)[source]

Create an OR extra-info document.

See §2.2 “Extra-info documents” in dir-spec.txt.

For transport scramblesuit lines, the password parameter always is ABCDEFGHIJKLMNOPQRSTUVWXYZ234567, i.e.:

transport scramblesuit 10.0.1.111:4444 password=ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
Parameters:
  • nickname (str) – The router’s nickname.
  • fingerprint (str) – A space-separated, hex-encoded, SHA-1 digest of the OR’s private identity key. See convertToSpaceyFingerprint().
  • ts (str) – An ISO-8601 timestamp. See makeTimeStamp().
  • ipv4 (str) – An IPv4 address.
  • port (str) – The OR’s ORPort.
Return type:

str

Returns:

An extra-info document (unsigned).