| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| * | | Implement AsyncWrite for DataWriter. | Nick Mathewson | 2021-03-10 | 1 | -24/+155 | |
| | | | ||||||
| * | | Revise DataReader to implement AsyncRead. | Nick Mathewson | 2021-03-10 | 2 | -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 indirection | Nick Mathewson | 2021-03-10 | 1 | -36/+56 | |
| | | | ||||||
| * | | Make note_ended private on RawCellStream. | Nick Mathewson | 2021-03-10 | 2 | -8/+18 | |
| | | | ||||||
| * | | Move DataStream into its own module. | Nick Mathewson | 2021-03-10 | 2 | -204/+212 | |
| | | | ||||||
| * | | Move ResolveStream to its own module. | Nick Mathewson | 2021-03-10 | 2 | -35/+42 | |
| | | | ||||||
| * | | Implement From<tor_proto::Error> for std::io::Error | Nick Mathewson | 2021-03-10 | 1 | -0/+23 | |
| | | | ||||||
| * | | Move RawCellStream into its own module. | Nick Mathewson | 2021-03-10 | 2 | -86/+106 | |
| | | | ||||||
| * | | Rename TorStream => RawCellStream | Nick Mathewson | 2021-03-10 | 2 | -20/+20 | |
| | | | ||||||
| * | | Refactor DataStream constituents a bit. | Nick Mathewson | 2021-03-09 | 2 | -34/+94 | |
| | | | | | | | | | | | | | | | | | | | 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. | |||||
| * | | upgrade async-trait | Nick Mathewson | 2021-03-09 | 3 | -3/+3 | |
| | | | ||||||
| * | | Bump dependencies with "cargo upgrade" | Nick Mathewson | 2021-03-06 | 14 | -25/+25 | |
| | | | ||||||
| * | | Avoid unwrap() in llcrypto. | Nick Mathewson | 2021-03-04 | 1 | -1/+1 | |
| | | | ||||||
| * | | Avoid unwrap() in dirmgr. | Nick Mathewson | 2021-03-04 | 2 | -3/+7 | |
| | | | ||||||
| * | | Remove an unwrap in dirclient. | Nick Mathewson | 2021-03-04 | 1 | -40/+41 | |
| | | | ||||||
| * | | Move content-encoding handling to decompress | Nick Mathewson | 2021-03-04 | 4 | -85/+76 | |
| | | | | | | | | | This way tor-dirclient doesn't need to link to the compression crates. | |||||
| * | | Add tor-decompress to top-level Cargo.toml | Nick Mathewson | 2021-03-04 | 1 | -0/+1 | |
| | | | ||||||
| * | | Merge remote-tracking branch 'origin/mr/18' into main | Nick Mathewson | 2021-03-04 | 4 | -14/+38 | |
| |\ \ | ||||||
| | * | | Moves decompress related code into tor-decompress crate | Kushal Das | 2021-03-04 | 4 | -14/+38 | |
| | |/ | | | | | | | | | The related data structures are marked as public in the tor-decompress crate so that tor-dirclient can access them. | |||||
| * | | Avoid unwrap() in dirmgr | Nick Mathewson | 2021-03-04 | 2 | -11/+22 | |
| | | | ||||||
| * | | Avoid unwrap() in tor-consdiff. | Nick Mathewson | 2021-03-04 | 1 | -8/+4 | |
| | | | ||||||
| * | | Avoid unwrap() in tor-config | Nick Mathewson | 2021-03-04 | 1 | -5/+8 | |
| | | | ||||||
| * | | clippy warning on msg.rs | Nick Mathewson | 2021-03-04 | 1 | -8/+5 | |
| | | | ||||||
| * | | Remove use of unwrap() in tor-client. | Nick Mathewson | 2021-03-04 | 2 | -7/+15 | |
| | | | ||||||
| * | | Use expect() instead of unwrap() in tor-circmgr | Nick Mathewson | 2021-03-04 | 1 | -4/+12 | |
| | | | ||||||
| * | | tor-cert: use expect() instead of unwrap() | Nick Mathewson | 2021-03-04 | 1 | -2/+8 | |
| | | | ||||||
| * | | Change how we sort link specifiers in extend cells | Nick Mathewson | 2021-03-04 | 2 | -8/+7 | |
| | | | | | | | | | | | Instead of implementing a dubious PartialOrd for link spec, add a sorting function and call that explicitly. | |||||
| * | | Avoid an is_some()/unwrap() pair in End cell parsing | Nick Mathewson | 2021-03-04 | 1 | -6/+8 | |
| |/ | ||||||
| * | Missing doc for private member | Nick Mathewson | 2021-03-02 | 1 | -0/+3 | |
| | | ||||||
| * | CI target to build with async-std. Running tests is harder, alas | Nick Mathewson | 2021-03-02 | 1 | -0/+6 | |
| | | ||||||
| * | Update docs wrt tokio a bit | Nick Mathewson | 2021-03-02 | 3 | -8/+23 | |
| | | ||||||
| * | Make a few async_test tests work correctly again. | Nick Mathewson | 2021-03-02 | 2 | -155/+166 | |
| | | | | | | | 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 Mathewson | 2021-03-02 | 15 | -36/+177 | |
| | | | | | | | | | | | | | | | | | | | 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. | |||||
| * | My rustfmt is up-to-date with the gitlab ci one again | Nick Mathewson | 2021-03-01 | 2 | -10/+20 | |
| | | ||||||
| * | Disable our cargo fmt test on CI for now. | Nick Mathewson | 2021-02-26 | 1 | -1/+5 | |
| | | ||||||
| * | Merge remote-tracking branch 'origin/mr/16' into main | Nick Mathewson | 2021-02-26 | 1 | -22/+37 | |
| |\ | ||||||
| | * | Refactor StreamMap methods to use HashMap::Entry | George Kadianakis | 2021-02-26 | 1 | -22/+37 | |
| | | | ||||||
| * | | Move .onion check into TorClient. | Nick Mathewson | 2021-02-25 | 2 | -7/+5 | |
| | | | ||||||
| * | | Clean-ups for documentations and lints in tor-client | Nick Mathewson | 2021-02-25 | 2 | -10/+24 | |
| | | | ||||||
| * | | Use a ConnectPref type for TorClient::connect, simplify APIs a bit, doc some. | Nick Mathewson | 2021-02-25 | 3 | -23/+90 | |
| | | | ||||||
| * | | Restore code in proxy.rs so that socks timeout errors work again | Nick Mathewson | 2021-02-25 | 2 | -15/+17 | |
| | | | | | | | | | | | This isn't pretty, since it now has to use anyhow::downcast_ref(). I've noted a TODO about maybe not using anyhow::Error for this case. | |||||
| * | | Start refactoring the tor-client crate. | Nick Mathewson | 2021-02-25 | 4 | -199/+252 | |
| | | | | | | | | | | | This commit splits the proxy and client code into a proper module, and keeps a stripped down version of the main.rs file. | |||||
| * | | run cargo fix --edition-idioms | Nick Mathewson | 2021-02-25 | 2 | -4/+4 | |
| | | | ||||||
| * | | Use futures::join!() to simplify test_create(). | Nick Mathewson | 2021-02-23 | 1 | -19/+11 | |
| | | | ||||||
| * | | Update to latest futures, once_cell | Nick Mathewson | 2021-02-23 | 9 | -9/+9 | |
| | | | ||||||
| * | | Fix an intermittent test failure on int overflow. | Nick Mathewson | 2021-02-19 | 1 | -1/+4 | |
| | | | ||||||
| * | | Update some dependencies. | Nick Mathewson | 2021-02-19 | 16 | -17/+17 | |
| |/ | ||||||
| * | Make first-level directory retry logic configurable. | Nick Mathewson | 2021-02-17 | 4 | -25/+73 | |
| | | ||||||
| * | Make our initial bootstrap retry schedule configurarable | Nick Mathewson | 2021-02-17 | 7 | -12/+112 | |
| | | ||||||
| * | tor-dirmgr: simplify config.rs a bit. | Nick Mathewson | 2021-02-16 | 1 | -52/+14 | |
| | | ||||||
