<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div><br></div><div>On 17 Feb 2018, at 23:08, Katharina Haselhorst <<a href="mailto:katharina.haselhorst@sit.fraunhofer.de">katharina.haselhorst@sit.fraunhofer.de</a>> wrote:<br><br></div><blockquote type="cite"><div><span>Hello,</span><br><blockquote type="cite"><blockquote type="cite"><span>You might be looking for getHiddenServiceDirVersions in RelayServerDescriptor (see [0])?</span><br></blockquote></blockquote><blockquote type="cite"><span>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:</span><br></blockquote><blockquote type="cite"><span>hidden-service-dir</span></blockquote></div></blockquote><div><br></div><div>Do not use <span style="background-color: rgba(255, 255, 255, 0);">getHiddenServiceDirVersion.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">It will not tell you the correct versions for most relays.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">It should be deprecated.</span></div><br><blockquote type="cite"><div><span>I see - this means:</span><br><span>null for getHieednServiceDirVersion -> no support at all</span><br></div></blockquote><div><br></div><div>Yes.</div><br><blockquote type="cite"><div><span>empty list -> default</span><br></div></blockquote><div><br></div><div>No, the list returned by <span style="background-color: rgba(255, 255, 255, 0);">getHiddenServiceDirVersion</span> contains version 2 if the line</div><div>is empty [0], even if the relay supports versions 2 and 3. This is a spec bug [1],</div><div>and an implementation bug.</div><div><br></div><blockquote type="cite"><div><span>otherwise -> the versions announced</span><br></div></blockquote><div><br></div><div>Relays that use the Tor codebase do not announce versions in this line.</div><div>It is not accurate.</div><br><blockquote type="cite"><div><span>And the better source of information about the exact versions supported is the one from getProtocols.</span><br><span>Did I get that right?</span><br></div></blockquote><div><br></div>You must use getProtocols to get HSDir versions.<div>There is no other field that is accurate.<br><div><br><div>T<br><br><div><div><font color="#000000" style="background-color: rgba(255, 255, 255, 0);">[0] <a href="https://gitweb.torproject.org/metrics-lib.git/tree/src/main/java/org/torproject/descriptor/impl/ServerDescriptorImpl.java#n464" style="background-color: rgba(255, 255, 255, 0);">https://gitweb.torproject.org/metrics-lib.git/tree/src/main/java/org/torproject/descriptor/impl/ServerDescriptorImpl.java#n464</a></font></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><font color="#000000" style="background-color: rgba(255, 255, 255, 0);">[1] <a href="https://trac.torproject.org/projects/tor/ticket/25284" style="background-color: rgba(255, 255, 255, 0);">https://trac.torproject.org/projects/tor/ticket/25284</a></font></div></div></div></div></div></body></html>