Existing Onion routing services have many drawbacks: Tor relies on relatively few publicly known servers, I2P takes a long time to build connections.
The Onion routing would happen in two steps:
Random selection of layer nodes
Layer creation
The node selection process would happen via a Mesh message that is either answered or forwarded to a random compatible contact. The response would include the UUID and public key of that node.
The Layers would be established through a DiffieHellman (or ECDH) key exchange via already established nodes. The first node would be directly connected to then the first layer would be established. The UUID and public key of the next node would then be sent to the current. It would then connect to that node, after which its layer would be established. This would continue to the last node to which is then treated as a contact.
Instead of a custom solution, it might make sense to base it off Tor and make it compatible with the main version. The differences would be in the following areas:
Relay/Bridge discovery
Connection (Entry relays are not needed as you can connect to Relays behind NATs)
Existing Onion routing services have many drawbacks: Tor relies on relatively few publicly known servers, I2P takes a long time to build connections.
The Onion routing would happen in two steps:
The node selection process would happen via a Mesh message that is either answered or forwarded to a random compatible contact. The response would include the UUID and public key of that node.
The Layers would be established through a DiffieHellman (or ECDH) key exchange via already established nodes. The first node would be directly connected to then the first layer would be established. The UUID and public key of the next node would then be sent to the current. It would then connect to that node, after which its layer would be established. This would continue to the last node to which is then treated as a contact.