summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src/sample.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add #[serde(flatten)] HashMap fields to serializable objectseta2021-10-271-2/+12
| | | | | | | | | | As per arti#175, we'd like to be able to handle newer Arti versions storing additional state in the persisted state files, without dropping this data on the floor when we write out changes to these files. Use the #[serde(flatten)] mechanism to achieve this, by adding catch-all HashMap<String, JsonValue> fields to all structs that are at risk of this happening to them.
* Avoid a strange borrow syntax in tor_guardmgr::sampleNick Mathewson2021-10-261-3/+3
| | | | I'm not sure what I was thinking here.
* Implement a "lightweight" form of pathbias detection.Nick Mathewson2021-10-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | We now track, for every guard: the total number of successful circuits we've built through it, along with the total number of "indeterminate" circuits. Recall that a circuit's status is "indeterminate" if it has failed for a reason that _might_ be the guard's fault, or might not be the guard's fault. For example, if extending to the second hop of the circuit fails, we have no way to know whether the guard deliberately refused to connect there, or whether the second hop is just offline. But we don't want to forgive all indeterminate circuit failures: if we did, then a malicious guard could simply reject any second hops that it didn't like, thereby filtering the client into a chosen set of circuits. As a stopgap solution, this patch now makes guards become permanently disabled if the fraction of their circuit failures becomes too high. See also general-purpose path bias selection (arti#65), and Mike's idea for changing the guard reachability definition (torspec#67). This patch doesn't do either of those. Closes #185.
* guardmgr: Don't use guards that are marked as unlisted.Nick Mathewson2021-10-251-7/+17
| | | | Closes #202.
* Implement the guard side of shared state directories.Nick Mathewson2021-10-211-0/+9
|
* Make the guard selection function return a more useful type.Nick Mathewson2021-10-111-0/+5
|
* Add a few tracing calls to tor-guardmgr.Nick Mathewson2021-10-081-7/+20
|
* Resolve small issues and XXXX/TODO comments in GuardMgr.Nick Mathewson2021-10-071-12/+17
| | | | | By the time I merge this, most of the comments should have tickets to go with them.
* Tests for tor_guardmgr::sample.Nick Mathewson2021-10-071-1/+330
|
* Initial backend implementation for guard node manager.Nick Mathewson2021-10-071-0/+690
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.