tor-proto API extension points for onion services etc
Most of the onion services protocol can be implemented as simple extensions to the parts of the Tor protocol already implemented in the tor-proto
crate. We should design those APIs into tor-proto
as needed so that we can keep most of the hidden services code in a new, separate crate.
In particular, I think we should be able to implement most of the introduce protocol and most of the rendezvous protocol outside of the tor-proto
crate, though handling rendezvous circuits once they are joined may require additional work.
Some of this logic will be a precursor to how we handle relay implementations, since the behavior (receive a cell, act on it, send back an answer) is not too different.
Subtasks:
-
Generic way to send a relay message on a circuit. (8h) -
Generic way to accept raw messages on a circuit. (for getting introduce cells) (4h) -
Generic way to wait for a single message on a circuit. (4h) -
Above APIs should have easy way to make sure you get only the message types that you want to, and do the right thing on other message types (8h) -
Ability to add a raw crypto hop at the end of a multi-hop circuit. (for rendezvous join) (12h) -
Ability to handle more cell types on a circuit in use for data (for getting begin cells). (16h)
Edited by Nick Mathewson