0

Parsing the Tor Consensus gives us the IP Addresses of active relays in the Tor network.

Is there a way of getting a relay's descriptors from that particular relay itself ?

Thanks :)

  • Even if it was serving directory requests, it'd be serving the same as any other relay? What are you trying to achieve with this? – cacahuatl Sep 28 '17 at 2:06
  • Just wanted to know if its possible because it sends descriptors to directory authorities. I wanted to know if we have an IP address of a relay , could we use the stem library to get descriptors to a tor client. Is there any functionality in stem for this? Thanks for the comment :) – Mithrandir Sep 28 '17 at 2:18
  • Also , certain relays are safe to use for anonymity and querying the DA's produces latency for the network. Also , Tor gives us the flexibility of choosing the guard, middle amd exit, so.. – Mithrandir Sep 28 '17 at 2:25
  • Are you aware of how Tor already fetches directory information? Stem just queries Tor's current cache, you might also be interested in the dir-spec. – cacahuatl Sep 28 '17 at 3:43
  • Which Tor relay? Is it HSDir? – defalt Dec 28 '17 at 4:17
1

A Tor relay's descriptor is available at that relay as the resource '/tor/server/authority[.z]'. This is useful when you don't know the relay's fingerprint.

Using IPredator as an example:

http://197.231.221.211:9030/tor/server/authority

Or, using stem:

import stem.descriptor.remote dir_port = ('197.231.221.211', 9030) stem.descriptor.remote.Query(resource='/tor/server/authority.z', endpoints=[dir_port]).run()[0]

Or, if you prefer to use the high-level API, which gets the same relay descriptor, but using a slightly different resource internally ('/tor/server/fp/fingerprint.z'):

import stem.descriptor.remote fingerprint = 'BC630CBBB518BE7E9F4E09712AB0269E9DC7D626' dir_port = ('197.231.221.211', 9030) desc = stem.descriptor.remote.get_server_descriptors(fingerprints=[fingerprint], endpoints=[dir_port]).run()[0]

stem can retrieve descriptors using either method, but only when the relay has a DirPort.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.