0

I want to create a custom tor circuit. I can get the list of relay nodes using get_network_statuses() of stem library, but I am not sure how whether a specific node can be used as guard node, middle node or exit node. Is there any way to identify that? If so, then how to do it.

  • If you get the router status entry for the given node, you can inspect the `flags` to see if the relay has the Guard, and/or Exit flags in order to determine if they can be used as a guard or exit relay. https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt describes all known flags (from section 3.4.1. Vote and consensus status document formats). – drew010 Oct 24 '22 at 22:42
  • https://stem.torproject.org/api/descriptor/router_status_entry.html – drew010 Oct 24 '22 at 23:09

0 Answers0