summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Remove "write_and_consume_infallible".Nick Mathewson2022-07-112-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | There were only a few of these. Removing it required porting everything to use `write_and_consume` instead, and handling its (potential) errors.
| * | | Convert each write_onto_infallible implementation into write_onto.Nick Mathewson2022-07-117-29/+51
| | | |
| * | | Convert each write_into_infallible implementation into write_into.Nick Mathewson2022-07-111-1/+2
| | | | | | | | | | | | | | | | (There was only one.)
| * | | Define new write_into and write_onto methods with correct APIs.Nick Mathewson2022-07-112-6/+56
| | | |
| * | | Rename "write" methods on tor-bytes to "write_infallible".Nick Mathewson2022-07-1112-178/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This comprises four renames: ``` write_onto -> write_onto_infallible write_into -> write_into_infallible write -> write_infallible writer_and_consume -> write_and_consume_infallible. ``` The rest of this branch will be concerned with replacing these `_infallible` methods with ones that return a `Result`. This is part of #513.
| * | | Add a Bug variant to tor-bytes::EncodeError.Nick Mathewson2022-07-112-2/+11
| | | | | | | | | | | | | | | | This will help down the line as we make more writers fallible.
* | | | Merge branch 'eq' into 'main'eta2022-07-191-1/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | tor-cell: Derive Eq for NtorV3Extension See merge request tpo/core/arti!631
| * | | tor-cell: Derive Eq for NtorV3ExtensionIan Jackson2022-07-181-1/+1
| | | | | | | | | | | | | | | | Apropos clippy complaint.
* | | | Merge branch 'dormant' into 'main'Ian Jackson2022-07-194-24/+207
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | Make dormant be a postage::watch See merge request tpo/core/arti!632
| * | | tor-basic-utils: Add a test for DropNotifyWatchSenderIan Jackson2022-07-191-0/+17
| | | |
| * | | tor-basic-utils: Add ref to upstream issue re dropIan Jackson2022-07-191-0/+3
| | | |
| * | | tor-basic-utils: Add comment about lack of raceIan Jackson2022-07-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In answer to https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/632#note_2822107 I think this is subtle enough that it deserves a comment.
| * | | arti-client: Do periodic task dormancy in a management taskIan Jackson2022-07-181-37/+28
| | | | | | | | | | | | | | | | | | | | This means that it is no longer possible to write code which updates the dormant mode but forgets to notify the periodic tasks.
| * | | arti-client: Make dormant_mode be an Option, None on dropIan Jackson2022-07-181-13/+27
| | | | | | | | | | | | | | | | | | | | This will allow receivers (which we are about to introduce) to terminate when the last client is dropped.
| * | | arti-client: Provide DropNotifyWatchSenderIan Jackson2022-07-181-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are going to be some tasks (well, right away, one task) which will want to go away when the sender is dropped. The docs in postage are silent, but postage::watch::Sender does not have a Drop impl so I don't think we can rely on the Receivers getting None from their Stream impl. So we're going to have the watch send Options, which are None only when the sender is dropped.
| * | | arti-client: Convert dormant_mode into a postage::watchIan Jackson2022-07-181-17/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to want to be able to wake up other tasks elsewhere in Arti, that need to know about dormancy. We will give them a postage watch Receiver. Right now there are no such things yet.
| * | | arti-client: Make DormantMode have a DefaultIan Jackson2022-07-181-1/+3
| | | |
| * | | arti-client: Add Bug variant to errorIan Jackson2022-07-181-0/+5
| | | | | | | | | | | | | | | | We're going to want this in a moment.
| * | | Provide maybe_send on postage::watch::Sender, via extension traitIan Jackson2022-07-182-0/+89
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to replace the AtomicBool for dormant mode with something that can wake up tasks. postage::watch is the right shape. But we want to be able to update it but suppress no-op updates. (There is going to be a call site where no-op updates can occur.) In the absence of a suitable upstream method as requested here https://github.com/austinjones/postage-rs/issues/56 we introduce this facility via an extension trait.
* | | Merge branch 'dirmgr_error_cleanup' into 'main'Nick Mathewson2022-07-184-61/+85
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Clean up some errors in tor-dirmgr Closes #521 See merge request tpo/core/arti!628
| * | | dirmgr: Add a helper to create LockFile errors.Nick Mathewson2022-07-182-8/+9
| | | |
| * | | dirmgr: Make UnrecognizedSchema more helpfulNick Mathewson2022-07-142-6/+14
| | | |
| * | | dirmgr: Add an instance of BadUtf8InCacheNick Mathewson2022-07-141-2/+1
| | | |
| * | | dirmgr: Clarify disk IO errors.Nick Mathewson2022-07-144-33/+49
| | | |
| * | | dirmgr: style edits to error messages.Nick Mathewson2022-07-141-22/+22
| | | |
* | | | tor-persist: Resource::Temporary: Mark with cfgIan Jackson2022-07-181-0/+1
| |/ / |/| | | | | | | | Without this, some builds get a "variant is never constructed" warning.
* | | Merge branch 'cirmgr_error_cleanup' into 'main'Ian Jackson2022-07-159-49/+179
|\ \ \ | | | | | | | | | | | | | | | | Clean-ups in circmgr errors See merge request tpo/core/arti!625
| * | | Apply 1 suggestion(s) to 1 file(s)Ian Jackson2022-07-131-1/+1
| | | |
| * | | circmgr: Refactor DirPathBuilder::pick_path.Nick Mathewson2022-07-121-9/+7
| | | | | | | | | | | | | | | | | | | | We no longer needs to have a "return" at the end of each match block.
| * | | circmgr: Use FilterCounts to explain why we couldn't build pathsNick Mathewson2022-07-124-20/+58
| | | |
| * | | circmgr: Use FilterCounts to explain why we couldn't find an exit.Nick Mathewson2022-07-122-14/+40
| | | |
| * | | netdir: Make pick() functions take FnMut closures.Nick Mathewson2022-07-122-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | There's no reason to enforce their being Fn closures, and allowing them to be FnMut allows us to count which filters make us rejected given relays.
| * | | tor-basic-utils: Add a new interface to FilterCountNick Mathewson2022-07-121-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This interface allows using FilterCount with functions that expect predicates rather than iterator chains. I'm about to use it to get meaningful FilterCount results in the path-selection code in circmgr.
| * | | tor-circmgr: Clarify and improve Protocol error.Nick Mathewson2022-07-123-1/+24
| | | |
| * | | tor-circmgr: minor error message edits.Nick Mathewson2022-07-121-5/+5
| | |/ | |/|
* | | Bump tor-dirmgr to version 0.5.1.tor-dirmgr-v0.5.1Nick Mathewson2022-07-141-1/+1
| | | | | | | | | | | | | | | This does not require a change in any other crate, since the change here does not affect tor-dirmgr's APIs.
* | | Fix illegal formatting in cache filenamesfeelingnothing2022-07-141-1/+1
| |/ |/|
* | tor-persist: StateMgr: vagueify docs about NoLock errorIan Jackson2022-07-121-1/+1
| | | | | | | | `NoLock` is now a variant of `err::ErrorSource` but that is private.
* | Fix two rustdoc linksIan Jackson2022-07-121-2/+2
|/ | | | This type must have been renamed, I guess.
* Merge branch 'ntor3-high-level' into 'main'eta2022-07-083-23/+278
|\ | | | | | | | | Implement a higher-level API for the ntor v3 handshake See merge request tpo/core/arti!618
| * Implement a higher-level API for the ntor v3 handshakeeta2022-07-083-23/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements a higher-level API for the ntor v3 handshake, in line with that exposed by the ntor handshake. It does not, however, use the existing `ClientHandshake` trait, due to fundamental differences in the handshakes (namely, that the v3 handshake can include some additional extra extension data). Currently, the higher-level API assumes circuit extension, and copies the (undocumented!) magic verification string from c-tor that indicates this usage. A rudimentary set of functions for serializing and deserializing extensions to be sent with the handshake is also included, implementing the protocol in proposal 332 § A.2. Currently, it only implements the congestion control extensions specified in proposal 324 § 10.3. part of arti#88
* | Merge branch 'guardmgr-error-cleanup' into 'main'Nick Mathewson2022-07-087-33/+229
|\ \ | | | | | | | | | | | | GuardMgr: Improve and revamp error types and messages. See merge request tpo/core/arti!619
| * | Add a semver note to FilterCountNick Mathewson2022-07-081-1/+6
| | |
| * | Note semver break in tor-guardmgr::Error.Nick Mathewson2022-07-071-0/+1
| | |
| * | Remove now-unused NoGuardsUsable case.Nick Mathewson2022-07-071-8/+2
| | |
| * | Improve message for failure to select a guard.Nick Mathewson2022-07-072-19/+48
| | | | | | | | | | | | This uses similar techniques to the commit I just did for Fallbacks.
| * | Add more information to failed-to-select fallback errors.Nick Mathewson2022-07-073-6/+23
| | | | | | | | | | | | Also re-order the filters to be a little more logical.
| * | FilterCount: Add a simple Display helper.Nick Mathewson2022-07-061-0/+34
| | | | | | | | | | | | | | | | | | This is a helper rather than a Display implementation because it isn't the only logical way to display these values. (In fact, without context, it isn't even the _most_ logical way)
| * | New "counting filter" iterator helper in tor-basic-utils.Nick Mathewson2022-07-062-0/+116
| | | | | | | | | | | | | | | | | | | | | This is going to make it simpler to write the code in guardmgr (and later in circmgr) that keeps track of how many relays were rejected for what reason. The latter, in turn, should improve error messages when we're unable to pick a guard or a path.
| * | GuardMgr: tweak an error message.Nick Mathewson2022-07-061-1/+1
| | |