summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src/daemon.rs
Commit message (Collapse)AuthorAgeFilesLines
* GuardMgr: Update to use new NetDirProvider API.Nick Mathewson2022-07-261-1/+1
|
* Move responsibility for GuardMgr NetDir updates to GuardMgr.Nick Mathewson2022-06-071-0/+30
| | | | | | | | | | | Previously it was the job of a task in CircMgr to do this; but we're going to want to give GuardMgr full access to the latest NetDir for this, and for other code-simplification reasons. With this change I'm deprecating a couple of functions in tor-circmgr. It's no longer necessary for us to have an artificial external way for you to feed new NetDirs to a circmgr. (I could just remove them, but I want practice deprecating.)
* GuardMgr: record clock skew information.Nick Mathewson2022-04-071-2/+2
| | | | (It is not yet actually used.)
* Create and use API to report guard/fallback skew.Nick Mathewson2022-04-071-2/+3
| | | | (The information is not yet recorded.)
* Refactor tor-guardmgr's inter-task communication.Nick Mathewson2021-11-021-41/+7
| | | | | | | | | This is based on @eta's patches for !118 and !119: Since we already have an unbounded channel, we don't need to use an elaborate mess of one-shot senders. We can just use the unbounded_send() method, which also lets us enqueue a message without having to await. Closes #219.
* Improve some documentation linksNick Mathewson2021-10-291-3/+3
| | | | | | | | | Instead of putting a fully qualified name in the text, in most cases we should just use the short name of the type or function we're referring to. In other words, instead of saying [`crate::module::Foo`], we should typically say [`Foo`](crate::module::Foo).
* Rename GuardStatusMsg, make it public, add an `Indeterminate` case.Nick Mathewson2021-10-131-2/+2
|
* Use an mpsc::unbounded() channel in GuardMgr.Nick Mathewson2021-10-101-5/+4
| | | | | | | | | | | | The advantage here is that we no longer have to use a futures-aware Mutex, or a blocking send operation, and therefore can simplify a bunch of the GuardMgr APIs to no longer be async. That'll avoid having to propagate the asyncness up the stack. The disadvantage is that unbounded channels are just that: nothing in the channel prevents us from overfilling it. Fortunately, the process that consumes from the channel shouldn't block much, and the channel only gets filled when we're planning a circuit path.
* Tests for top-level GuardMgr.Nick Mathewson2021-10-071-11/+32
| | | | | | | Also, refactor our message handling to be more like the tor_proto reactors. The previous code had a bug where, once the stream of events was exhausted, we wouldn't actually get any more notifications.
* Initial backend implementation for guard node manager.Nick Mathewson2021-10-071-0/+102
There are some missing parts here (like persistence and tests) and some incorrect parts (I am 90% sure that the "exploratory circuit" flag is bogus). Also it is not integrated with the circuit manager code.