summaryrefslogtreecommitdiff
path: root/tor-dirclient
Commit message (Collapse)AuthorAgeFilesLines
* Remove "default-features=false" thing on tor-rtcompat for now.Nick Mathewson2021-06-241-1/+1
|
* Bump version dependencies to 0.0.0Nick Mathewson2021-06-241-6/+6
|
* Remove "publish = false"Nick Mathewson2021-06-241-1/+0
|
* Fix some warnings about needless & from nightly clippyNick Mathewson2021-06-181-1/+1
|
* Remove some (but not all) needless dependencies.Nick Mathewson2021-06-171-2/+0
|
* Enormous tor-circmgr rewrite.Nick Mathewson2021-06-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with the tor-chanmgr code, the circuit manager is now implemented using an AbstractCircMgr type that uses traits to abstract the particular behavior of other types that it uses. (Specifically: circuits, building circuits, and telling whether one circuit usage is compatible with another.) Abstracting out the dependencies in this ways makes it possible to test the circuit manager without having to actually build real circuits. This commit also introduces new behavior for handling pending circuit requests. Upon getting a new request, first we check to see if there's an existing circuit we can use. If there isn't, we look for pending circuits and wait for them. If there aren't any pending circuits we can use, we launch one or more, and wait for them. So far, that's the same as the old behavior. But here's a change: if, while we are waiting for some pending circuits, a different circuit is completed, and it's one we could use, then the task that was building _that_ circuit will tell us: "please look at this circuit". This gives us better changes of getting a usable circuit fast. Minor changes: * The Error type in CircMgr no longer uses anyhow; several errors have been simplified. * We've gotten more formal about the relationship between circuit usage and target usage.
* Add noop_method_call warning.Nick Mathewson2021-05-271-0/+1
| | | | | | This would have saved ahf and me a lot of confusion in debugging a situation where we were cloning a reference of a type that didn't implement Clone.
* Enable cargo_common_metadata warning.Nick Mathewson2021-05-251-0/+1
|
* Add automatically generated README.md files to each crate.Nick Mathewson2021-05-251-0/+20
|
* Module docs for remaining cratesNick Mathewson2021-05-251-5/+13
|
* Give every Cargo.toml a repository fieldNick Mathewson2021-05-191-0/+1
|
* Fill in "package.categories" on all Cargo.tomlNick Mathewson2021-05-191-0/+1
|
* Add the "unreachable_pub" lint.Nick Mathewson2021-05-181-0/+1
| | | | | | This is a somewhat obnoxious change in its scope and requirements, but it makes it easier to understand what the real public and private parts of our APIs are.
* Prefer "relay" to "server" when appropriate.Nick Mathewson2021-05-181-1/+1
|
* Resolve clippy warnings from Rust 1.52.Nick Mathewson2021-05-071-1/+1
| | | | | | | | | | Rust 1.52 just came out, and there are new clippy lints to deal with: * It spots more cases when we could use Option::map * It spots more cases when we could use Iterator::flatten * When we build a struct instance, it wants us to list the fields in the same order that the struct declares them.
* Add trait_duplication_in_bounds warning.Nick Mathewson2021-05-031-0/+1
|
* Add unseparated_literal_suffix lint, and fix it.Nick Mathewson2021-05-031-0/+1
|
* Add a few more clippy warningsNick Mathewson2021-05-031-0/+5
|
* Bump regex and memchr versionsNick Mathewson2021-05-031-1/+1
|
* Split mocking parts of rtcompat into new rtmock crate.Nick Mathewson2021-05-032-2/+2
| | | | | Since these parts are testing-only, let's take steps to make sure we don't ship them in production by accident.
* Add some more clippy warnings to our list.Nick Mathewson2021-04-271-1/+6
|
* Enforce (and obey) clippy lints about exhaustive enums, structs.Nick Mathewson2021-04-272-0/+4
| | | | | | | | These lints force us to declare our exported enums and exhaustive-looking structs as non-exhaustive (so that we can add to them in the future without breaking our API) or to explicitly disable the warning for a given enum/struct (to say that we _intend_ for additions to be a breaking change).
* upgrade httparse and zeroizeNick Mathewson2021-04-251-1/+1
|
* Only list the supported encodings in the `Accept-Encoding` headerNick Mathewson2021-04-211-10/+27
| | | | Closes #113
* Use stream_pair() to write a test for tor_dirclient::downloadNick Mathewson2021-04-211-0/+50
|
* Make zstd and xz compression optional, but on-by-default.Nick Mathewson2021-04-212-3/+17
|
* Test for tor_dirclient::read_headersNick Mathewson2021-04-201-0/+39
|
* Tests for tor_dirclient::read_and_decompressNick Mathewson2021-04-201-3/+86
|
* Test for tor_dirclient::read_until_limited()Nick Mathewson2021-04-201-0/+35
|
* tor-dirclient: more requests.rs testsNick Mathewson2021-04-201-10/+69
|
* Move timer functions into an extension trait.Nick Mathewson2021-04-172-5/+5
|
* Move around the public modules in tor_rtcompat.Nick Mathewson2021-04-171-1/+1
|
* Remove all non-runtime methods in tor_rtcompat.Nick Mathewson2021-04-161-9/+19
|
* Add a "Runtime" parameter to all the manager types.Nick Mathewson2021-04-161-3/+6
| | | | | This is a big change, but it is a step towards our goal of removing tor_rtcompat:: calls directly.
* Replace tor-decompress with async-compression crate.Nick Mathewson2021-04-133-64/+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.
* Major revision on DirMgr logic -- almost a complete rewrite.Nick Mathewson2021-04-131-2/+2
| | | | | | | | 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.
* Start moving responsibility for building requests into dirmgrNick Mathewson2021-04-091-0/+31
| | | | This will help with my planned "directory state" refactoring.
* Upgrade rsa, zstd, httpdate. Remove redundant pin-project.Nick Mathewson2021-04-051-1/+1
|
* Make ConsensusRequest take a flavor.Nick Mathewson2021-04-011-9/+13
|
* Add accessors for members of different directory requestsNick Mathewson2021-04-012-35/+63
| | | | | | | | 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
|
* Rename ServerDescriptorRequest to RouterDescRequestNick Mathewson2021-03-301-7/+7
| | | | | Rationale: the name of the request should match the name of the type that you parse from it.
* ServerDescriptorRequest: handle "all.z" case differentlyNick Mathewson2021-03-301-7/+25
| | | | | | Having "no descriptors" mean "all of them" is kind of an accident waiting to happen, and had wrong behavior for partial_docs_ok() and max_response_len().
* fix clippy warnings in request.rsNick Mathewson2021-03-301-5/+2
|
* Move RdDigest to routerdesc.rsNick Mathewson2021-03-301-1/+1
|
* dir: Add server descriptor directory requestDavid Goulet2021-03-301-0/+60
| | | | Signed-off-by: David Goulet <[email protected]>
* Fix Rust-1.51 clippy warnings about acronyms in camel case.Nick Mathewson2021-03-292-4/+4
| | | | This is painful, but we shouldn't have to do it again.
* Rename Rsa{Identity,Signature} to fix clippy warning.Nick Mathewson2021-03-291-4/+4
|
* Refactor errors in tor-decompress and tor-dirclient.Nick Mathewson2021-03-244-67/+104
| | | | | This lets us reinstate the code in dirclient that retired circuits depending on the error type.