[tor-bugs] #24837 [Metrics/Onionoo]: Allow Relay Searches for Additional Flags

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jan 9 18:06:03 UTC 2018


#24837: Allow Relay Searches for Additional Flags
-----------------------------+------------------------------
 Reporter:  teor             |          Owner:  metrics-team
     Type:  enhancement      |         Status:  new
 Priority:  Medium           |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------

Comment (by irl):

 The following flags are synthesised by Relay Search:

 ||=Flag=||=Description=||
 || NotRecommended || This relay is running a version of tor that is not
 recommended by the directory authorities ||
 || Unmeasured || This relay has not been measured by at least 3 bwauths ||
 || Hibernating || This relay indicated that it is hibernating in its last
 known descriptor ||
 || FallbackDir || This relay is listed as a fallback directory in the tor
 source code ||
 || ReachableIPv6 || This relay has been confirmed as reachable via IPv6 in
 the consensus ||
 || UnreachableIPv4 || This relay was not reachable on at least one IPv4
 address published in the server descriptor ||
 || UnreachableIPv6 || This relay was not reachable on at least one IPv6
 address published in the server descriptor ||
 || IPv6 Exit || This relay allows exit connections to IPv6 hosts ||

 The relevant code in Relay Search is:

 {{{
 /* Synthetic Additional Flags */
 var additional_flags = []
 if (!((typeof relay.recommended_version !== 'undefined') ?
 relay.recommended_version : true)) additional_flags.push("Not
 Recommended");
 if (!((typeof relay.measured !== 'undefined') ? relay.measured : true))
 additional_flags.push("Unmeasured");
 if (((typeof relay.hibernating !== 'undefined') ? relay.hibernating :
 false)) additional_flags.push("Hibernating");
 if (IsFallbackDir(relay.fingerprint))
 additional_flags.push("FallbackDir");
 if (relay.or_v6_addresses.length > 0)
 additional_flags.push("ReachableIPv6");
 if (relay.unreachable_or_v4_addresses.length > 0)
 additional_flags.push("UnreachableIPv4");
 if (relay.unreachable_or_v6_addresses.length > 0)
 additional_flags.push("UnreachableIPv6");
 if (relay.exit_policy_v6_summary !== null) additional_flags.push("IPv6
 Exit");
 }}}

 For the Onionoo protocol, I would prefer it if these flags are kept
 separate from the dir-spec flags in a new "additional_flags" field, but
 for searching it would be good to still have "flag:X" work. I don't know
 if this introduces a lot more complexity in Onionoo though.

 Things that would need to be done as I understand it:

 * Add a new "additional_flags" field to Onionoo's relay details documents
 * Extend the "flag" parameter to also search in this new field, as well as
 the existing "flags" field
 * Synthesise each of the flags:
  * NotRecommended, Hibernating and Unmeasured are all based on boolean
 values already in the document
  * ReachableIPv6, UnreachableIPv4 and UnreachableIPv6 will require
 checking the "or_addresses" and "unreachable_or_addresses" fields
  * IPv6 Exit will require checking the exit policies
  * FallbackDir will depend on #24436

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24837#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list