summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove need for async_trait in SleepProviderExtNick Mathewson2021-04-171-11/+42
|
* Move timer functions into an extension trait.Nick Mathewson2021-04-1710-143/+136
|
* Move around the public modules in tor_rtcompat.Nick Mathewson2021-04-1714-15/+22
|
* Remove all non-runtime methods in tor_rtcompat.Nick Mathewson2021-04-1611-89/+132
|
* Add a "Runtime" parameter to all the manager types.Nick Mathewson2021-04-1612-58/+105
| | | | | This is a big change, but it is a step towards our goal of removing tor_rtcompat:: calls directly.
* rtcompat: Make TLS functionality use Runtime traits.Nick Mathewson2021-04-1610-74/+108
| | | | | Now there is nothing in principle that you couldn't access from a Runtime implementation.
* Move the "sleep()" function from task to timer.Nick Mathewson2021-04-162-11/+9
|
* Make incoming Streams of TcpStream a real type for each backend.Nick Mathewson2021-04-165-44/+92
| | | | | This makes things a little more complicated for AsyncStd, and a little simpler for Tokio.
* Port tor_rtcompat::net to use Runtime objects.Nick Mathewson2021-04-163-26/+56
|
* Port tor_rtcompat::timer to use Runtime objects.Nick Mathewson2021-04-163-29/+60
|
* Begin a refactoring of tor-rtcompat to use runtime objects.Nick Mathewson2021-04-165-27/+187
| | | | | | | | So far, all traits are defined (I hope) and the task api is ported. With time I want to have none of the current "global runtime" APIs exposed, and just use Runtime objects instead. But that isn't just yet.
* rtcompat: rename traits module to impl_traits.Nick Mathewson2021-04-162-2/+2
|
* upgrade dalek dependenciesNick Mathewson2021-04-141-2/+2
|
* Fix a compilation problem with async_std.Nick Mathewson2021-04-131-1/+1
| | | | Thank you, CI!
* Replace tor-decompress with async-compression crate.Nick Mathewson2021-04-137-439/+50
| | | | This lets us simplify tor-dirclient a fair bit. Closes #79.
* tor-dirclient: Use AsyncBufRead to simplify code a bit.Nick Mathewson2021-04-132-29/+63
| | | | | | | | | | | Previously we read too much data from our input, and then used the unused portion as an initial state of a buffer for handling subsequent data. Yuck! Instead we can just use an AsyncBufRead and only read the parts we want. This code takes some pains to never read too much data: I'd rather just "read until the first CRLF" or have some kind of pushback mechanism. But for now it's probably fine.
* Merge branch 'dirstate'Nick Mathewson2021-04-1311-1154/+1449
|\
| * Major revision on DirMgr logic -- almost a complete rewrite.Nick Mathewson2021-04-1310-1139/+1298
| | | | | | | | | | | | | | | | The big idea of this revision is to separate the code that knows about doing downloads from the code that decides what to download. Later, we can make a similar change for database access. With these changes together, we can make our code much more testable, and eventually enable more download types in parallel.
| * DocQuery: sort requests before splitting.Nick Mathewson2021-04-091-4/+13
| |
| * Start moving responsibility for building requests into dirmgrNick Mathewson2021-04-094-40/+167
| | | | | | | | This will help with my planned "directory state" refactoring.
* | Remove fallback_caches.toml, which is no longer in syncNick Mathewson2021-04-132-747/+0
| |
* | Merge remote-tracking branch 'origin/mr/30'Nick Mathewson2021-04-131-410/+1374
|\ \
| * | fallbackdir: New list from April 2021David Goulet2021-04-121-410/+1374
| |/ | | | | | | Signed-off-by: David Goulet <[email protected]>
* / circmgr: Add missing rng trait to build_path()David Goulet2021-04-091-1/+4
|/ | | | Signed-off-by: David Goulet <[email protected]>
* rtcompat: Add a cancellable-task-handle type.Nick Mathewson2021-04-092-4/+24
| | | | | | | The API is a bit yucky, since it has to be compatible with tokio and async_std. (Also, this patch fixes some async_std clippy warnings)
* Merge branch 'mr_28_squashed'Nick Mathewson2021-04-073-0/+31
|\
| * circmgr: Add a function to build a circuit by pathDavid Goulet2021-04-073-0/+31
|/ | | | | | | Public function so an application can use to build a circuit using a custom path. Signed-off-by: David Goulet <[email protected]>
* Upgrade rsa, zstd, httpdate. Remove redundant pin-project.Nick Mathewson2021-04-054-4/+3
|
* Remove a few unused dependenciesNick Mathewson2021-04-053-3/+0
|
* Upgrade rusqlite; remove needless usage.Nick Mathewson2021-04-054-29/+16
|
* DirMgr::netdir() is no longer asyncNick Mathewson2021-04-023-13/+10
| | | | | | | | Since we moved to a non-async mutex(*), we no longer need to worry that this function might need to suspend. (*) This is _not_ safe in general, but it's okay in this case, since we never suspend while holding that mutex: see shared_ref.rs.
* missing file.Nick Mathewson2021-04-021-0/+78
|
* Turn the shared network directory reference into its own typeNick Mathewson2021-04-021-27/+13
| | | | | | Doing this will make it easier to use it from other parts of the crate, and will make it more obvious that it's safe to use a regular (not async) rwlock here.
* Merge branch 'hs3_ntor_squashed'Nick Mathewson2021-04-023-0/+533
|\
| * hs_ntor: add a disclaimer and put it behind a feature.Nick Mathewson2021-04-023-0/+12
| |
| * First draft of HS Ntor implementation.George Kadianakis2021-04-022-0/+521
| |
* | Fix a rust 1.51 warning: remove a semicolonNick Mathewson2021-04-021-1/+1
| |
* | Make ConsensusRequest take a flavor.Nick Mathewson2021-04-012-10/+15
| |
* | Add accessors for members of different directory requestsNick Mathewson2021-04-013-38/+66
| | | | | | | | | | | | | | | | This will let us use these types both as client and server-side implementations. Making this change required me to change the download code to take requests by reference. (Sorry, David)
* | Rename ClientRequest to Requestable.Nick Mathewson2021-04-012-8/+8
|/
* DirMgr: add text() and texts() functions to ask for document textNick Mathewson2021-03-317-32/+320
| | | | | Also, start on a larger refactoring where we ask for documents by their ID.
* Note redundancy in authority and fallback toml files.Nick Mathewson2021-03-312-0/+8
|
* Refactor sqlite.rs to know about consensus flavors.Nick Mathewson2021-03-312-27/+56
| | | | | These were stored in the database before, but they were hardwired in the API.
* Make ConsensusFlavor a real type.Nick Mathewson2021-03-312-27/+58
| | | | Previously we were "stringly typing" this field. Now it's time to stop.
* Use Arc::make_mut() to simplify the code a bitNick Mathewson2021-03-302-26/+11
| | | | | Previously we used NetDir::extend here, which used try_unwrap. But it's much simpler to use the intended object for this purpose.
* Look for RdDigest in the right locationNick Mathewson2021-03-301-1/+2
|
* Merge branch 'sd-storage'Nick Mathewson2021-03-301-12/+124
|\
| * small tweaks to routerdesc storage code.Nick Mathewson2021-03-301-48/+20
| |
| * dirmgr: Add functions to store/read/update router descriptorsDavid Goulet2021-03-301-3/+131
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * dirmgr: Add SQLite schema for router descriptorsDavid Goulet2021-03-301-9/+21
| | | | | | | | Signed-off-by: David Goulet <[email protected]>