[tor-dev] Default bridges that are not publishing statistics

Damian Johnson atagar at torproject.org
Mon Jun 5 16:17:56 UTC 2017

> You asked your bridge for its server descriptor and it gave it to you.
> Did you try:
>              print controller.get_extrainfo_descriptors("8B5F0BD647B3C4AF2C57F148FF6A1FB8B695B0AE")
> https://stem.torproject.org/api/descriptor/remote.html#stem.descriptor.remote.DescriptorDownloader.get_extrainfo_descriptors

Hi teor, minor correction: you link to the DescriptorDownloader's method
but cite it as being part of Controller. This is why David didn't find it
later. The Controller can fetch some descriptor types. For instance...


However, the Controller doesn't provide extrainfo descriptors. This is
for a couple reasons...

1. The control protocol only allows it to be retrieved by the descriptor
   digest rather than relay fingerprint, which is a pita...


2. This isn't what you want anyway. Fetching decriptors from the tor
   process only gets you the cached descriptors which isn't what folks
   generally want. So you're right that the DescriptorDownloader is
   the way to go.

> I don't know how to find a server that caches *all* bridge extra infos.
> Maybe you should try running these queries against the bridge authority?

Bridge descriptors are not public like normal descriptors. To work of
course the tor client can retrieve it if you know the bridge address
but beyond that I think the only thing available is the sanitized
descriptors from CollecTor...


> I think the documentation at:
> https://stem.torproject.org/api/descriptor/remote.html#stem.descriptor.remote.Query
> is out of date: as far as I know, newer stem versions try fallback
> directories rather than authorities.

Unfortunately it doesn't. I had to revert that because they lack
extrainfo docs...


> Thanks again for your suggestions. Passing endpoints= doesn't seem to do
> anything.
>         >>> import stem.descriptor.remote
>         >>> BIFROEST = ("", 80)
>         >>> print list(stem.descriptor.remote.get_server_descriptors("C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4", endpoints=(BIFROEST,)))
>         []

For what it's worth stem has authority information so this can also be
done with...

>>> import stem.descriptor.remote
>>> bifroest = stem.descriptor.remote.get_authorities()['Bifroest']
>>> print list(stem.descriptor.remote.get_server_descriptors("C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4", endpoints=((bifroest.address, bifroest.dir_port),)))

> It also doesn't work when trying the fingerprint of another default
> bridge, or of one I just got from bridge.torproject.org.

Alas, this is getting into areas I'm not too familiar with. To prevent
I'm sure bridges are handled specially.

> Atagar might be able to help with the stem side of things.

Happy to help if there's any other stem questions.

Cheers! -Damian

More information about the tor-dev mailing list