[tor-dev] Default bridges that are not publishing statistics
David Fifield
david at bamsoftware.com
Mon Jun 5 05:53:03 UTC 2017
On Mon, Jun 05, 2017 at 03:15:08PM +1000, teor wrote:
>
> > On 5 Jun 2017, at 15:06, David Fifield <david at bamsoftware.com> wrote:
> >
> > Calling get_extrainfo_descriptors from stem.descriptor.remote returns an
> > empty list. (499D92E08769BFC0B7941C74031335B9EC9E9BAE is the new
> > extra-info-digest I got from running just now.)
> > import stem.descriptor.remote
> > print list(stem.descriptor.remote.get_authorities())
> > print list(stem.descriptor.remote.get_server_descriptors("C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4"))
> > print list(stem.descriptor.remote.get_extrainfo_descriptors("499D92E08769BFC0B7941C74031335B9EC9E9BAE"))
> > This is the output. Bifroest is in the get_authorities list, so I assume
> > it's querying the bridge authority somewhere in there.
> > ['maatuska', 'tor26', 'Bifroest', 'longclaw', 'dizum', 'gabelmoo', 'moria1', 'dannenberg', 'Faravahar']
> > []
> > []
>
> 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.
>
> Even if that's not the case, stem will choose a random authority for
> you, which will (8/9 times) tell you that it knows nothing about any
> bridge extra infos. (I don't think authorities cache bridge extra
> infos.)
>
> Try passing Bifroest's address and DirPort to the endpoints= argument to
> get_extrainfo_descriptors():
> https://stem.torproject.org/api/descriptor/remote.html#stem.descriptor.remote.Query
Thanks again for your suggestions. Passing endpoints= doesn't seem to do
anything.
>>> import stem.descriptor.remote
>>> BIFROEST = ("37.218.247.217", 80)
>>> print list(stem.descriptor.remote.get_server_descriptors("C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4", endpoints=(BIFROEST,)))
[]
It also doesn't work when trying the fingerprint of another default
bridge, or of one I just got from bridge.torproject.org.
>>> print list(stem.descriptor.remote.get_server_descriptors("A09D536DD1752D542E1FBB3C9CE4449D51298239", endpoints=(BIFROEST,)))
[]
>>> print list(stem.descriptor.remote.get_server_descriptors("924E408BAE68C6C47A06BCDF6A44A53930708092", endpoints=(BIFROEST,)))
[]
I get the same output with and without the endpoints= argument, and
whether or not I provide the SHA-1 hash of the fingerprint.
Strangely, this call seems to just hang:
>>> print list(stem.descriptor.remote.get_extrainfo_descriptors("499D92E08769BFC0B7941C74031335B9EC9E9BAE", endpoints=(BIFROEST,)))
I tried some other things in Stem but none of them worked.
>>> from stem.control import Controller
>>> with Controller.from_port(port = 9051) as controller:
>>> controller.authenticate()
>>> print controller.get_server_descriptor("C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4")
router cymrubridge31 38.229.1.78 443 0 0...
>>> print controller.get_info("desc/id/C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4")
router cymrubridge31 38.229.1.78 443 0 0...
>>> print controller.get_info("extra-info/digest/499D92E08769BFC0B7941C74031335B9EC9E9BAE")
stem.InvalidArguments: GETINFO request contained unrecognized keywords: extra-info/digest/499D92E08769BFC0B7941C74031335B9EC9E9BAE
>>> import stem.connection
>>> import stem.socket
>>> control_socket = stem.socket.ControlPort(port = 9051)
>>> stem.connection.authenticate(control_socket)
>>> control_socket.send("GETINFO desc/id/C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4")
>>> print control_socket.recv()
desc/id/C8CBDB2464FC9804A69531437BCF2BE31FDD2EE4=
router cymrubridge31 38.229.1.78 443 0 0...
OK
>>> control_socket.send("GETINFO extra-info/digest/499D92E08769BFC0B7941C74031335B9EC9E9BAE")
>>> print control_socket.recv()
Unrecognized key "extra-info/digest/499D92E08769BFC0B7941C74031335B9EC9E9BAE"
More information about the tor-dev
mailing list