aboutsummaryrefslogtreecommitdiff
path: root/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* | Use AsyncRead and AsyncWrite in our proxy implementationNick Mathewson2021-03-101-0/+2
| |
* | Make DataStream implement AsyncRead and AsyncWrite.Nick Mathewson2021-03-101-1/+27
| |
* | Implement AsyncWrite for DataWriter.Nick Mathewson2021-03-101-24/+155
| |
* | Revise DataReader to implement AsyncRead.Nick Mathewson2021-03-102-23/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tricks I needed here turned out to be: * I needed to store the future returned by read_cell() while it is returning Poll::Pending. * Since the type of that future is secret, I needed to put it in a Box<dyn Future>. * But since that future holds a reference to the DataReader, that would create a self-referential structure if we tried to store the DataReader and the future at the same time. So instead, I had to make an enum() that either holds a DataReader directly, or holds the future that will give us back the DataReader when it's done. (I also had to change the read_cell() function so that it takes ownership of the DataReader, and returns it when it's finished.) (Daniel Franke explained how to do this.) * Finally, I couldn't figure out how to change the enum's type in-place, so I had to wrap it in an Option<>. (Daniel Franke says this isn't actually necessary.) I've noted a couple of places in the read code where I want to handle errors and closes more carefully.
* | Rearrange DataStream code a bit and add an internal layer of indirectionNick Mathewson2021-03-101-36/+56
| |
* | Make note_ended private on RawCellStream.Nick Mathewson2021-03-102-8/+18
| |
* | Move DataStream into its own module.Nick Mathewson2021-03-102-204/+212
| |
* | Move ResolveStream to its own module.Nick Mathewson2021-03-102-35/+42
| |
* | Implement From<tor_proto::Error> for std::io::ErrorNick Mathewson2021-03-101-0/+23
| |
* | Move RawCellStream into its own module.Nick Mathewson2021-03-102-86/+106
| |
* | Rename TorStream => RawCellStreamNick Mathewson2021-03-102-20/+20
| |
* | Refactor DataStream constituents a bit.Nick Mathewson2021-03-091-33/+93
| | | | | | | | | | | | | | | | | | These new (internal so far) APIs correspond more closely to what we'll need for AsyncRead and AsyncWrite. We also make write methods take a mutable reference to self, since that seems to be (closer to) what the AsyncRead/AsyncWrite code expects.
* | Bump dependencies with "cargo upgrade"Nick Mathewson2021-03-061-1/+1
|/
* Make a few async_test tests work correctly again.Nick Mathewson2021-03-021-33/+35
| | | | | | For these, we need to call tor_rtcompat::task::block_on() directly, since they would crash with tokio enabled. Perhaps down the line we should look for a better fix here.
* Port to work with tokio or async-std.Nick Mathewson2021-03-021-1/+1
| | | | | | | | | | | | | | | | | | This is fairly ugly and I think I'll need to mess around with the feature configuration a while until we get something that's pleasant to develop with. This still seems like a good idea, though, since we _will_ need to be executor-agnostic in the end, or we'll have no way to handle wasm or embedded environments. Later down the road, we'll probably want to use futures::Executor or futures::Spawn more than having global entry points in tor_rtcompat. That would probably make our feature story simpler. Tokio is the default now, since tokio seems to be more heavily used for performance-critical stuff. This patch breaks tests; the next one will fix them, albeit questionably.
* Merge remote-tracking branch 'origin/mr/16' into mainNick Mathewson2021-02-261-22/+37
|\
| * Refactor StreamMap methods to use HashMap::EntryGeorge Kadianakis2021-02-261-22/+37
| |
* | Use futures::join!() to simplify test_create().Nick Mathewson2021-02-231-19/+11
| |
* | Update to latest futures, once_cellNick Mathewson2021-02-231-1/+1
| |
* | Fix an intermittent test failure on int overflow.Nick Mathewson2021-02-191-1/+4
| |
* | Update some dependencies.Nick Mathewson2021-02-191-1/+1
|/
* upgrade a few dependenciesNick Mathewson2021-02-101-2/+2
|
* Simplify error checking in begin_data_stream().George Kadianakis2021-02-081-18/+12
|
* Implement timeout for new streams (set to 120 seconds).George Kadianakis2021-02-053-11/+35
|
* Rename client-demo to tor-client.Nick Mathewson2021-02-021-1/+1
|
* bump serde and logNick Mathewson2021-02-011-1/+1
|
* require latest futures crateNick Mathewson2021-01-151-1/+1
|
* Migrate from futures_codec to asynchronous_codec.Nick Mathewson2021-01-154-4/+6
| | | | | | | | asynchronous_codec is a fork of futures_codec that is up-to-date on its dependencies. This migration allows us to upgrade to the current version of the bytes crate.
* Upgrade a few more dependencies.Nick Mathewson2021-01-131-2/+2
|
* Upgrade a few dependencies.Nick Mathewson2021-01-131-2/+2
|
* Fix some clippy warnings from nightly.Nick Mathewson2021-01-022-4/+10
|
* cargo upgrade.Nick Mathewson2020-12-301-1/+1
|
* Implement the "circwindow" and "ExtendByEd25519ID" parametersNick Mathewson2020-12-222-19/+95
| | | | | | These necessitated a little complexity for our circuit creation/extension API; we might want to refactor that down the road.
* When a stream read fails, block writes too.Nick Mathewson2020-12-221-13/+10
| | | | Closes arti#49.
* Cargo-upgrade a few dependenciesNick Mathewson2020-12-211-2/+2
|
* Fix a few clippy warningsNick Mathewson2020-12-171-3/+3
|
* Handle an error in circuit.rs without crashing.George Kadianakis2020-12-171-1/+4
|
* Simplify RelayCellBody::recognized() method.George Kadianakis2020-12-171-27/+22
| | | | | | self is no longer mutable. Co-authored-by: David Goulet <[email protected]>
* Basic support for IPv6 and begin flags.Nick Mathewson2020-12-151-3/+10
| | | | | | We now have a way to tell a circuitmgr whether we require ipv4/ipv6 support for a target address in an exit policy, and we use similar logic to set begin flags.
* Fix some rustdoc warnings.Nick Mathewson2020-12-094-6/+7
|
* Make RSAIdentity implement Copy.Nick Mathewson2020-12-081-2/+2
|
* Resolve a few nightly-only clippy issuesNick Mathewson2020-12-071-0/+2
|
* Mark some XXXX issues as XXXX-A1.Nick Mathewson2020-12-072-4/+4
|
* Run cargo fix --edition-idiomsNick Mathewson2020-12-023-3/+3
|
* Expose UniqId types for channels and circuitsNick Mathewson2020-12-014-14/+30
|
* Rename LogId -> UniqId.Nick Mathewson2020-12-017-106/+125
|
* Derive more types for circuit and channel LogIdsNick Mathewson2020-12-012-2/+2
|
* Enforce uniqueness on circuit and channel logidsNick Mathewson2020-12-011-3/+9
|
* Upgrade a couple of dependenciesNick Mathewson2020-11-281-1/+1
|
* Refactor first-hop handling types a bitNick Mathewson2020-11-172-3/+7
| | | | | | This lets us have the notion of "get the first hop of a path as some kind of a chantarget", which will make it easier to write other path types.