summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | fix with_coverage script to exclude pub(crate) mod test from resultstrinity-1686a2022-03-241-1/+1
| | | |
| * | | move isolation in separate moduletrinity-1686a2022-03-245-330/+336
| | | |
| * | | seal trait Isolationtrinity-1686a2022-03-241-1/+11
| | | |
| * | | rename *_isolation_group to *_isolationtrinity-1686a2022-03-246-19/+19
| | | |
* | | | Merge branch 'main' into 'main'Ian Jackson2022-03-251-2/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fixed typo on arti-client README.md See merge request tpo/core/arti!432
| * | | | Fixed typo on arti-client README.mdsolanav2022-03-241-2/+0
| |/ / /
* | | | Merge branch 'dir-filter' into 'main'Ian Jackson2022-03-259-39/+184
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | arti-client, dirmgr: Initial DirFilter code See merge request tpo/core/arti!431
| * \ \ \ Merge branch 'm' into 'dir-filter'Nick Mathewson2022-03-255-69/+23
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Simplify DirFilter API See merge request nickm/arti!1
| | * | | | DirFilter: Move nil default impls to trait default methodsIan Jackson2022-03-251-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means you can write a DirFilter and only write code to mess with the bits you want to. Also, it is less code here.
| | * | | | Abolish filter::DynFilter in favour of transparent DirFilterIan Jackson2022-03-255-55/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two reasons why the DynFilter newtype might be needed: 1. To impl Default. But we don't need it to impl Default since we can have an accessor which does the defaulting. 2. To hide the API. But this is usrely an unstable API. Just writing Arc<dyn> gets rid of a lot of unnecessary boilerplate and conversion code.
| | * | | | Make DirFilter be Debug + Send + SyncIan Jackson2022-03-252-9/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | Abolish the handwritten Debug impl for DynFilter, which is no longer needed.
| * | | | Expose DirFilter from arti-client.Nick Mathewson2022-03-243-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | This will make it possible to implement a directory-munging mechanism in arti-testing for #397.
| * | | | dirmgr: Initial DirFilter code.Nick Mathewson2022-03-246-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code sits behind a feature flag, and can be used to modify directories before storing them. This is part of the implementation for #397.
| * | | | Reformat {arti-client,tor-dirmgr}/Cargo.tomlNick Mathewson2022-03-242-38/+53
| |/ / /
* | | | Merge branch 'task-scheduler-2' into 'main'eta2022-03-255-36/+397
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Implement a periodic task scheduler, and a basic dormant mode See merge request tpo/core/arti!429
| * | | tor-rtcompat/scheduler: add unit tests, FireIn -> FireAteta2022-03-242-7/+142
| | | | | | | | | | | | | | | | | | | | Addressing review comments: added some unit tests for the new scheduler type, and made FireIn use an Instant instead (making it FireAt).
| * | | Implement a periodic task scheduler, and a basic dormant modeeta2022-03-235-36/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a revised version of !397; it implements a scheduling system for periodic tasks that can be externally controlled, and then uses the external control aspect to implement a basic dormant mode (#90). More technically, the scheduling system consists of a `Stream` that periodic tasks are expected to embed in a `while` loop or similar, a way for tasks themselves to choose how long to wait until the stream next yields a result, and a handle to control this outside of the task.
* | | | Merge branch 'netinfo-clock-skew' into 'main'Nick Mathewson2022-03-239-28/+268
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-proto: add the ability to learn clock skew from NETINFO cells See merge request tpo/core/arti!410
| * | | | tor-proto: better errors when handshake fails due to untimely certsNick Mathewson2022-03-234-15/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now check the handshake certificates unconditionally, and only report them as _expired_ as a last resort. (Rationale: if somebody is presenting the wrong identity from a year ago, it is more interesting that they are presenting the wrong ID than it is that they are doing so with an expired cert. We also now report a different error if the certificate is expired, but its expiration is within the range of reported clock skew. (Rationale: it's helpful to distinguish this case, so that we can blame the failure on possible clock skew rather than definitely attributing it to a misbehaving relay.) Part of #405.
| * | | | tor-proto: add a backend to detect reported clock skew.Nick Mathewson2022-03-237-13/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NETINFO cells, which are sent in every handshake, may contain timestamps. This patch adds an accessor for the timestamp in the Netinfo messages, and teaches the tor-proto code how to compute the minimum clock skew in the code. The computation isn't terribly precise, but it doesn't need to be: Tor should work fine if your clock is accurate to within a few hours. This patch also notes a Y2038 problem in the protocol: see torspec#80. Part of #405.
* | | | | Merge branch 'move-system-config' into 'main'eta2022-03-234-54/+39
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move SystemConfig to arti::cfg Closes #418 and #314 See merge request tpo/core/arti!427
| * | | | | Move SystemConfig to arti::cfgIan Jackson2022-03-214-54/+39
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #314, #418.
* | | | | | Merge branch 'more_iso_docs' into 'main'eta2022-03-231-7/+63
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | Expand documentation for isolation traits See merge request tpo/core/arti!420
| * | | | | Expand documentation for isolation traitsNick Mathewson2022-03-171-7/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These aren't complete yet; I'm just making this commit to capture the notes we took on a pad when we were discussing these APIs. Part of #414.
* | | | | | Merge branch 'channel_retries' into 'main'Nick Mathewson2022-03-2118-227/+594
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change rules for retrying guards (and marking them broken) See merge request tpo/core/arti!426
| * | | | | | Expand some comments based on review from @diziet.Nick Mathewson2022-03-213-1/+14
| | | | | | |
| * | | | | | circmgr: When planning, only keep one error; log them all.Nick Mathewson2022-03-211-3/+6
| | | | | | |
| * | | | | | Fix build with Rust 1.53.Nick Mathewson2022-03-211-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pattern bindings after `@` weren't stabilized then :/
| * | | | | | dirmgr: Note errors and inform the circmgr about them.Nick Mathewson2022-03-214-7/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some error types indicate that the guard has failed as a dircache. We should treat these errors as signs to close the circuit, and to mark the guard as having failed.
| * | | | | | GuardMgr:: generalize GuardId::from_relay.Nick Mathewson2022-03-213-6/+10
| | | | | | |
| * | | | | | GuardMgr: new API to record guard problems from outside the crate.Nick Mathewson2022-03-212-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll need this so that we can say "This guard behaved bogusly as a directory cache; try somebody else."
| * | | | | | dirclient: Collect and expose peer information from errors.Nick Mathewson2022-03-215-58/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit refactors the dirclient error type into two cases: errors when constructing a circuit, and errors that occur once we already have a one-hop circuit. The latter can usually be attributed to the specific cache we're talking to. This commit also adds a function to expose the information about which directory gave us the info.
| * | | | | | Expose more peer information from circuit build failuresNick Mathewson2022-03-213-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have the ability to get peer information from ChanMgr errors, and therefore from any RetryErrors that contain ChanMgr errors. This commit adds optional peer information to tor-proto errors, and a function to expose whatever peer information is available.
| * | | | | | dirclient: Remember the source of each resposne we receive.Nick Mathewson2022-03-214-7/+18
| | | | | | |
| * | | | | | Reformat tor-dirclient Cargo.tomlNick Mathewson2022-03-211-13/+15
| | | | | | |
| * | | | | | circmgr: Change API for using FallbackDirsNick Mathewson2022-03-215-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It'll soon more convenient to pass in FallbackDirs as a slice of references, rather than just a slice of FallbackDirs: I'm going to be changing how we handle these in tor-dirmgr.
| * | | | | | circmgr: use AllGuardsDown to retry betterNick Mathewson2022-03-212-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If all guards are down and they won't be retriable for a while, try waiting that long to get whichever guard _is_ retriable. Additionally, if we are making multiple circuit plans in parallel, only report our planning as having failed if we failed at making _all_ the plans. Previously we treated any failure as fatal for the other plans, which could lead to trouble in the case when guards were all down or pending. Part of #407.
| * | | | | | GuardMgr: revise handling of "all guards are down".Nick Mathewson2022-03-213-21/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When all guards are down, we would previously mark them all as up, and retry aggressively. But that's far too aggressive: if there's something wrong with our ability to connect to guards, it makes us hammer the network over and over, ignoring all the guard retry timeouts in practice. Instead, * We now allow the `pick_guard()` function to fail without automatically retrying. * We give different errors in the cases when all our guards are down, and when all of the guards selected by our active usage are down. * Our "guards are down" error includes the time at which a guard will next be retriable. This is part of #407.
| * | | | | | GuardMgr: use decorrelated-jitter backoff for retrying guards.Nick Mathewson2022-03-211-80/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C tor used one schedule, and guard-spec specified another. But in reality we should probably use a randomized schedule to retry guards, for the reasons explained in the documentation for RetrySchedule. I've chosen the minima to be not too far from our previous minima for primary and non-primary guards. This is part of #407.
* | | | | | | Merge branch 'comment' into 'main'Nick Mathewson2022-03-211-1/+1
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | Adjust a comment See merge request tpo/core/arti!428
| * | | | | | Adjust a commentIan Jackson2022-03-211-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | Noticed this while reviewing !426
* | | | | | Merge branch 'move-more-config' into 'main'Nick Mathewson2022-03-215-89/+64
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | Move almost all of the rest of options.rs to arti crate See merge request tpo/core/arti!425
| * | | | | Run rustfmt to tidy up importsIan Jackson2022-03-212-2/+5
| | | | | |
| * | | | | ApplicationConfig: abolish accessorIan Jackson2022-03-213-10/+3
| | | | | |
| * | | | | Move ApplicationConfig to arti crateIan Jackson2022-03-214-32/+27
| | | | | | | | | | | | | | | | | | | | | | | | Code motion and import fixups.
| * | | | | socks: abolish config accessorsIan Jackson2022-03-212-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making these fields pub(crate) is quite reasonable and does away with the need for accessors.
| * | | | | Move ProxyConfig to arti crateIan Jackson2022-03-214-53/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We put this in cfg.rs, rather than (say) socks.rs, because it has config relating to both socks.rs and dns.rs. Code motion and import fixups.
* | | | | | derive_builder: more entries in Cargo.lockNick Mathewson2022-03-211-0/+6
| | | | | |
* | | | | | Merge branch 'udp-cleanup-410' into 'main'Ian Jackson2022-03-213-47/+10
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | UdpSocket: remove support for connect(). Closes #410 See merge request tpo/core/arti!424
| * | | | | UdpSocket: remove support for connect().Nick Mathewson2022-03-183-47/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, Arti doesn't need this. But once it does, it will be way better to have a separate type for connected sockets, rather than having to error-check every time somebody gives us a socket. Part of #410