Good afternoon, I have a task to develop a c ++ module for Tor. One of the sub-tasks of the module is to form a Tor chains. A list of auth servers, a list of guard nodes, a list of v2 directories, a list of encryption keys and server identifiers is sent to the module's input.
I am new to the Tor theme. Please tell me how are these chains formed?