[metrics-team] No "hidden-service-dir" information in ServerDescriptor

teor teor2345 at gmail.com
Fri Feb 16 22:05:44 UTC 2018


> On 17 Feb 2018, at 06:06, iwakeh <iwakeh at torproject.org> wrote:
> 
> Hi!
> 
>> On 02/16/2018 05:07 PM, Katharina Haselhorst wrote:
>> Hello,
>> 
>> This is a question to the metrics-lib team:
>> Is there a reason why there is no "hidden-service-dir" information in ServerDescriptor? 
> 
> You might be looking for getHiddenServiceDirVersions in RelayServerDescriptor (see [0])?

Most relays don't advertise any VersionNums for this field, so it won't tell you if the relay supports v2 or v3 HSDir. It just looks like this:
hidden-service-dir

And the dir-spec gives an incorrect default version of "2", when the default is "2 and 3" for some tor versions. I have opened a ticket for this spec bug:
https://trac.torproject.org/projects/tor/ticket/25284

If you want to know HSDir version, look at the protover field instead:
proto Cons=1-2 Desc=1-2 DirCache=1-2 HSDir=1-2 HSIntro=3-4 HSRend=1-2 Link=1-4 LinkAuth=1,3 Microdesc=1-2 Relay=1-2
Which is available using getProtocols() [1]
The HSDir protovers are defined in the tor-spec [2]. 1 is HSv2, and 2 is HSv3.
T
[1] https://metrics.torproject.org/metrics-lib/org/torproject/descriptor/ServerDescriptor.html#getProtocols--
[2] https://gitweb.torproject.org/torspec.git/tree/tor-spec.txt#n1926
> [0] https://metrics.torproject.org/metrics-lib/org/torproject/descriptor/RelayServerDescriptor.html
> 
> 
>> The dir-spec (https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt) does not list it as obsolete, so it seams
>> that this field containts relevant information.
>> Although it is of course possible to parse the raw data and extract the information, this is (as the api indicates) an expensive operation: I would need to ask gor the raw descriptor bytes which copies the relevant data into a new array...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/metrics-team/attachments/20180217/8951da20/attachment-0001.html>


More information about the metrics-team mailing list