summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge branch 'experimental-v3ident-public' into 'main'Ian Jackson2022-04-251-0/+5
|\ \ \ | | | | | | | | | | | | | | | | Authority: make v3ident public under experimental-api See merge request tpo/core/arti!463
| * | | Authority: make v3ident public under experimental-apiChristian Grigis2022-04-221-0/+5
| | | |
* | | | Merge branch 'test' into 'main'Ian Jackson2022-04-251-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-basic-utils: Add RetryDelay::reset test See merge request tpo/core/arti!467
| * | | | tor-basic-utils: Add RetryDelay::reset testSamanta Navarro2022-04-231-0/+2
| | |/ / | |/| |
* / | | fix typo in doctrinity-1686a2022-04-252-2/+2
|/ / /
* | | arti-client: TorClientConfig: derive TorClientConfigBuilderIan Jackson2022-04-221-171/+41
| | | | | | | | | | | | Replace handwritten builder struct, accessors, and builder function.
* | | arti: ArtiConfig: derive ArtiConfigBuilderIan Jackson2022-04-221-87/+13
| | | | | | | | | | | | Replace handwritten builder struct, accessors, and builder function.
* | | logfiles: Introduce LogfileListConfigBuilderIan Jackson2022-04-221-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/462#note_2797697 we decided not to do this. However, having looked again at the way the FallbackList works, I think there is a lot of value in making these two things (and anything else like them[1]) as similar as possible. [1] At least PreemptiveCircuitConfig.initial_predicted_ports and NetworkConfig.authorities need the same treatment, and perhaps also GuardUsage.restrictions (although there is no GuardRestrictionBuilder). In the irc discussion I imagined `LogfilesConfigBuilder` as opposed to `LogfileConfigBuilder` (differing only in the `s`) which would be bad, but we can use `List` instead. We do *not* need to abstract away the validated version of the config. Providing a type alias helps the derive_builder sub_builder DTRT without needing special overrides. I have split this commit so that we can drop it, if we conclude it's not wanted.
* | | logfiles: Adjust LoggingConfigBuilder::file and impl DeserializeIan Jackson2022-04-221-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change LoggingConfigBuilder to contain Vec<LogfileConfigBuilder>, not Option<Vec<LogfileConfig>>. That makes it sane to Deserialize. Replace LoggingConfigBuilder's file(Vec<>) setter with the methods discussed in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/462#note_2797697
* | | logfiles Rename LogfileConfig::file to filesIan Jackson2022-04-221-4/+4
| | | | | | | | | | | | | | | It's a plural, and that fact is going to be exposed via serde, if it isn't already.
* | | fallback list: Introduce and use FallbackListBuilderIan Jackson2022-04-226-29/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now the network fallbacks configuration wants to Deserialize a Vec<FallbackDirBuilder>, rather than validated Vec<FallbackDir>. Methods on FallbackListBuilder are as per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/462#note_2797697 mutatis mutandi for the fact that this struct has only fallbacks in it.
* | | fallback list: Move default list into tor-guardmgrIan Jackson2022-04-224-28/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is where the FallbackList type is. We are going to want to provide a builder too, which ought to impl Default. This means that the default value for the type must be next to the type. In any case, it was anomalous that it wasn't. This commit is pure code motion.
* | | impl From<SubfieldBuildError> for ConfigBuildErrorIan Jackson2022-04-221-0/+7
| | | | | | | | | | | | We are going to be using sub-field builders.
* | | Use git source for derive_builder for now, for sub_builder featureIan Jackson2022-04-216-6/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commitid is the current head of my MR branch https://github.com/colin-kiegel/rust-derive-builder/pull/253 https://github.com/ijackson/rust-derive-builder/tree/field-builder Using the commitid prevents surprises if that branch is updated. We will require this newer version of derive_builder. The version will need to be bumped again later, assuming the upstream MR is merged and upstream do a release containing the needed changes. We will need the new version of not only `derive_builder_core` (the main macro implementation) but also`derive_builder` for a new error type.
* | Fix typosSamanta Navarro2022-04-201-1/+1
| | | | | | | | Typos found with codespell.
* | Merge branch 'ticket_282' into 'main'Nick Mathewson2022-04-143-4/+176
|\ \ | | | | | | | | | | | | | | | | | | Remove obsolete files from our state directory. Closes #282 See merge request tpo/core/arti!457
| * | Fix build with Rust 1.53; we can't use map_whileNick Mathewson2022-04-141-1/+4
| | |
| * | tor-persist::fs::clean: Log warnings for directory read failuresIan Jackson2022-04-141-1/+19
| | |
| * | tor-persist::fs::clean: Tweaks based on review.Nick Mathewson2022-04-132-22/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename "deletable" to "obsolete". Simplify function structure. Report errors from `metadata()` and `modified()`. Don't claim that we're going to delete something unless we are. Comment about making CUTOFF configurable.
| * | Remove obsolete files from our state directory.Nick Mathewson2022-04-123-0/+139
| | | | | | | | | | | | | | | | | | | | | This patch removes files created by older versions of arti, if they are at least 4 weeks old. Closes #282
| * | Re-indent tor-persist/Cargo.toml.Nick Mathewson2022-04-121-4/+4
| | |
* | | Merge branch 'report-skew' into 'main'eta2022-04-139-35/+241
|\ \ \ | | | | | | | | | | | | | | | | Report skew estimates from arti-client See merge request tpo/core/arti!455
| * | | arti-client: Report clock skew when it is noteworthyNick Mathewson2022-04-123-6/+52
| | | | | | | | | | | | | | | | | | | | (Also, blame clock skew when it is an explanation of why we cannot finish a connection.)
| * | | chanmgr: expose whether we are failing because of expired certs.Nick Mathewson2022-04-122-20/+87
| | | |
| * | | circmgr: re-export clock skew estimates.Nick Mathewson2022-04-123-0/+16
| | | |
| * | | GuardMgr: publish skew estimates.Nick Mathewson2022-04-123-9/+86
| |/ / | | | | | | | | | | | | | | | Instead of just having a function that recalculates the latest clock skew, instead recalculate the clock skew when it may have changed, and notify other processes via a postage::watch.
* | | circmgr: back off on preemptive circuits if they fail consistentlyNick Mathewson2022-04-122-8/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than running preemptive circuit construction every 10 seconds, we change it to back off when it is "failing". (We define "failing" as creating no new circuits, and as giving at least one error.) This change means that we'll have one less reason to hammer the network when our connectivity is failed for some reason. Closes #437. Part of #329.
* | | circmgr: Remove now-unused scheduled entry points.Nick Mathewson2022-04-121-18/+8
| | | | | | | | | | | | | | | Now that we have TaskSchedule, we don't need to expose these any longer.
* | | circmgr: Report CircProvenance from AbstractCircMgr.Nick Mathewson2022-04-122-23/+34
|/ / | | | | | | | | | | | | This feature is similar to ChanProvenance from ChanMgr, except that we don't yet need to report it outside the crate. I'm going to use it to distinguish newly created circuits from existing circuits in the preemptive circuit builder.
* | guardmgr: fix a unit test panic.Nick Mathewson2022-04-111-1/+5
| | | | | | | | | | | | | | Apparently on OSX you are not allowed to construct an Instant that is a long time before the time when the test is running. Also, fix the length of a year in this test.
* | handshake.rs: Document the time for clock skew authentication.Nick Mathewson2022-04-111-3/+25
| |
* | Fold FallbackStatus into Entry.Nick Mathewson2022-04-111-44/+31
| | | | | | | | This simplifies the code a lot.
* | Add a couple of TODO items to clock-skew estimator.Nick Mathewson2022-04-111-0/+7
| |
* | Implement a better clock skew estimator.Nick Mathewson2022-04-113-24/+383
| | | | | | | | | | | | | | | | This time, our estimator discards outliers, takes the mean of what's left, and uses the standard deviation to try to figure out how seriously to take our report of skew/not-skew. These estimates are still not actually used.
* | Initial functions to determine and expose a clock skew estimate.Nick Mathewson2022-04-077-5/+124
| | | | | | | | | | (This is just a placeholder; I'm going to make the functions smarter in the next commit.)
* | Reformat tor-guardmgr/Cargo.tomlNick Mathewson2022-04-071-12/+12
| |
* | GuardMgr: record clock skew information.Nick Mathewson2022-04-076-22/+106
| | | | | | | | (It is not yet actually used.)
* | Create and use API to report guard/fallback skew.Nick Mathewson2022-04-074-15/+68
| | | | | | | | (The information is not yet recorded.)
* | ChanMgr: Return provenance information from get_or_launchNick Mathewson2022-04-073-21/+39
| | | | | | | | | | | | We need this since we want to report certain conditions only when they happen on a new channel, not if we observe them on a preexisting channel.
* | chanmgr: bubble ClockSkew up through the Error object.Nick Mathewson2022-04-075-12/+59
| | | | | | | | | | | | | | | | Fortunately, we don't need a separate type here: authenticated clock skew can only come attached to a `tor_proto::Error`. We also remove skew from `tor_proto::Error::HandshakeCertsExpired`, since it would now be redundant.
* | Channel: Expose our view of whether the clock is skewed, and the ageNick Mathewson2022-04-073-1/+33
| | | | | | | | | | | | | | | | of a channel. At first I wanted to have this information not be a part of channels at all, but it is a fairly tiny amount of data, and the alternatives are pretty crufty.
* | Merge branch 'downgrade_rlimit' into 'main'Nick Mathewson2022-04-062-2/+2
|\ \ | | | | | | | | | | | | Downgrade `rlimit` to 0.7. See merge request tpo/core/arti!449
| * | Downgrade `rlimit` to 0.7.Nick Mathewson2022-04-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream 0.8.2 has broken compilation with Rust 1.53; versions 0.8.{0,1} have been yanked. Possibly by the time the next arti version comes out, they'll have fixed this situation, or we'll have upgraded our MSRV. Upstream issue at https://github.com/Nugine/rlimit/issues/42 .
* | | Merge branch 'main' into 'separate_dir_status'Nick Mathewson2022-04-0612-88/+621
|\| | | | | | | | | | | # Conflicts: # doc/semver_status.md
| * | Merge branch 'untimely_dir_is_failed' into 'main'eta2022-04-063-18/+25
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Treat expired/not-yet-valid directory objects as Errors. Closes #431 See merge request tpo/core/arti!448
| | * | Treat expired/not-yet-valid directory objects as Errors.Nick Mathewson2022-04-053-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing this will make us treat caches that send us these objects as not-working, and close circuits to them instead of trying over and over. The case where we add a document from the cache requires special handling: it isn't actually a error to find an expired document in our cache (unless the passage of time itself is erroneous, which is a debatable proposition at best). Fixes #431.
| * | | Merge branch 'main' into 'retriable'Nick Mathewson2022-04-055-24/+155
| |\| | | | | | | | | | | | | | # Conflicts: # doc/semver_status.md
| * | | Distinguish UsageMismatch cases by whether a race is possibleNick Mathewson2022-04-042-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us say that the UsageMismatch cases in some parts of the code reflect a programming error (RetryTime::Never), whereas in other case it reflects another circuit request getting to the circuit first (RetryTime::Immediate).
| * | | RetryTime: Improve documentation.Nick Mathewson2022-04-041-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each case, describe its semantics (in addition to when you would create it). Explain the relationship between After and At. Stop saying "Strategy": we renamed this type to "RetryTime".
| * | | RetryTime: make loose_cmp pub.Nick Mathewson2022-04-041-1/+1
| | | |