Commit Graph

15 Commits

Author SHA1 Message Date
Nick Mathewson 50848b8fa0 Try to make a send/receive style API for streams. 2020-09-24 18:03:03 -04:00
Nick Mathewson da3a8fdd50 Add support for RELAY_END cells.
This was a hard one.  I need to make sure that we send an END cell
when the stream is dropped.  But we can't call an .await from inside
the drop() function, since drop() isn't async, and we don't have an
executor.

Fortunately, you can call send() on a oneshot::Sender without having
to await on it, so that's the obvious thing to put in drop().  But
we need some way to make sure that the oneshot::Receiver is given to
the reactor, and is .awaited.  For that, we needed a control
channel.  And the reactor needs to treat the control channel and the
close messages as equally important.

So that's how I wound up with a
  Fuse<Select<mpsc::Receiver<Result<Foo>>,
              SelectAll<Once<oneshot::Receiver<Foo>>>>>.

I doubt that this is actually the best way to handle any of this!
2020-09-24 15:33:54 -04:00
Nick Mathewson d96a949cb3 Update documentation 2020-09-21 13:43:58 -04:00
Nick Mathewson d5d11d6923 Update TODO file 2020-09-21 13:14:21 -04:00
Nick Mathewson bc00417f01 Start implementing streams and circuit-level reactors.
Also, revise nearly all of the circuit/channel interaction to
actually send relay cells to the right place and do sensible things
with them.
2020-09-21 10:42:36 -04:00
Nick Mathewson 0075b784a1 De-parameterize channel and circuit
By putting the cell-sink in a box, we can get rid of the need for
having everything that uses a channel or a circuit know what kind
of underlying TLS implementation it has.
2020-09-19 22:29:18 -04:00
Nick Mathewson 3d5f8cfec5 update wishlist: the rsa crate now supports oaep 2020-09-13 13:05:07 -04:00
Nick Mathewson ee9b871bc5 Make client-demo launch a request to www.torproject.org:80 2020-09-12 21:32:00 -04:00
Nick Mathewson 02fc8b2528 Implement extend2/extended2 handshake.
This is not a production-ready implementation: it will break if a
circuit is used for anything while an extend is pending.

Client-demo can now build 3-hop circuits.
2020-09-12 20:48:07 -04:00
Nick Mathewson d1039dda9b Simple functions to send and receive relay cells. 2020-09-12 16:25:10 -04:00
Nick Mathewson c978480aae more todo edits 2020-09-12 15:46:38 -04:00
Nick Mathewson 341e557b4c Revise TODO; add some milestones. 2020-09-12 14:26:26 -04:00
Nick Mathewson 567af1a82e update readme 2020-09-09 19:27:47 -04:00
Nick Mathewson 1491870db6 Update the TODO 2020-05-08 22:21:47 -04:00
Nick Mathewson bbcbf47902 Fresh git repository for work on "arti"
Arti is a rust tor implementation.  It's project I've been working
on for a few months now, in weekends and in spare time.  It doesn't
speak the tor protocol yet, and it doesn't connect to the network at
all.

It needs much more documentation and testing, but I'm just about
ready to show it to others.  See the README.md for a description of
what is there and what isn't.
2020-05-07 19:58:14 -04:00