summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | arti: Backend support for reconfiguring onion proxies.Nick Mathewson2023-12-051-6/+101
| | | |
* | | | tor-hsservice: Add functions to update the IPT mgr/publisher states.Gabriela Moldovan2023-12-111-7/+21
| | | | | | | | | | | | | | | | Part of #1083
* | | | tor-hsservice: Derive service state from the state of its components.Gabriela Moldovan2023-12-111-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to know the status of each component to be able to report the overall status of the service. Without this change, the service (and its components) have no way of knowing if a given transition is valid: if the state of a component (say, the IPT manager) is `Bootstrapping`, `Recovering` or `Broken`, a transition out of the current state is only valid if it is initiated by the same component that caused the current state (for example, if the publisher sets the state to `Recovering`, the IPT manager should not be allowed to trigger an overall state transition to `Running`). Part of #1083
* | | | tor-hsservice: Trim trailing whitespace.Gabriela Moldovan2023-12-111-1/+1
| |/ / |/| |
* | | Merge branch 'publisher-recompute-hsdir' into 'main'gabi-2502023-12-071-25/+30
|\ \ \ | | | | | | | | | | | | | | | | tor-hsservice: Fix publisher bug causing unnecessary uploads. See merge request tpo/core/arti!1806
| * | | tor-hsservice: Remove unused lifetime.Gabriela Moldovan2023-12-071-1/+1
| | | | | | | | | | | | | | | | Fixes a clippy lint.
| * | | tor-hsservice: Remove unused function.Gabriela Moldovan2023-12-071-16/+0
| | | |
| * | | tor-hsservice: Fix publisher bug causing unnecessary uploads.Gabriela Moldovan2023-12-071-27/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where the publisher wasn't preserving the `DescriptorStatus` of its `HsDirs` when handling consensus changes. The bug is described in more detailed in the TODO removed by this commit.
| * | | tor-hsservice: Add a TODO about a publlisher bugGabriela Moldovan2023-12-071-0/+17
| | | |
| * | | tor-hsservice: Rename period to ctx for clarity.Gabriela Moldovan2023-12-071-2/+2
| | | | | | | | | | | | | | | | This is actually a `TimePeriodContext`.
* | | | Merge branch 'ntor-v3-circmgr' into 'main'Nick Mathewson2023-12-075-29/+74
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti: add ntor-v3 handshake experimental feature Closes #1084 See merge request tpo/core/arti!1766
| * | | | ClientCir: use ntor_v3 handshake when target supports itJim Newsome2023-12-072-18/+51
| | | | |
| * | | | tor-circmgr: add experimental feature "ntor_v3"Jim Newsome2023-12-071-1/+2
| | | | |
| * | | | NtorV3Extension set encoding/decoding: include n_extensionsJim Newsome2023-12-073-10/+21
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An encoded set of extensions in the ntorv3 handshake includes a header with the number of extensions. This change adds that header. It also changes `write_many_onto` to take a slice instead of an iterator, since we need to know the number of extensions up-front. In principle we could take a clonable iterator instead and use Iterator::count, but it's probably not worth the extra complexity.
* | | | Merge branch 'hsclient_parallelism_notes' into 'main'Alexander Færøy2023-12-071-7/+8
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | hsclient: Clean up some TODOs about parallelism. See merge request tpo/core/arti!1795
| * | | hsclient: Clean up some TODOs about parallelism.Nick Mathewson2023-12-051-7/+8
| | |/ | |/| | | | | | | | | | | | | | | | | | | * Be a little more specific about what is being parallelized. * Remove TODOs about specs, in favor of torspec#244. * Note some other issues surrounding some of the cases. (See discussions of points 3-6 at #913)
* | | Merge branch 'persist-macro' into 'main'Ian Jackson2023-12-0714-431/+705
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Improve KeySpecifier, errors, IptKeySpecifier impl, etc. Closes #1116 and #1148 See merge request tpo/core/arti!1796
| * | tor-hsservice: keys: Remove unused imports (and a blocking todo)Ian Jackson2023-12-071-2/+0
| | |
| * | tor-keymgr: ArtiPath[Component]: Manually reformat derive listsIan Jackson2023-12-071-32/+8
| | |
| * | tor-keymgr: ArtiPath: impl serdeIan Jackson2023-12-071-0/+3
| | |
| * | tor-keymgr: ArtiPathComponent: Use unqualified namesIan Jackson2023-12-071-3/+3
| | | | | | | | | | | | This makes this like the list for ArtiPath.
| * | tor-keymgr: ArtiPath[Component]: Don't DerefMutIan Jackson2023-12-071-3/+1
| | | | | | | | | | | | That would allow construction of invalid paths.
| * | tor-keymgr: ArtiPath[Component]: Add some more test aspectsIan Jackson2023-12-071-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Test that the FromStr and TryFrom impls give the same answers as new(). These tests dodn't even compile before Properly validate in FromStr because the derive-more generated version has a wrong error type.
| * | tor-keymgr: ArtiPath[Component]: Properly validate in FromStrIan Jackson2023-12-071-2/+11
| | | | | | | | | | | | | | | | | | | | | As pointed out in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1796#note_2974513 derive-more just parses like the inner type, so an unvalidated String. That is wrong.
| * | tor-keymgr: ArtiPath[Component]: Use d-a to generate various methodsIan Jackson2023-12-071-30/+36
| | | | | | | | | | | | Now ArtiPath too is TryFrom<String> and AsRef<str>.
| * | tor-keymgr: ArtiPath: Introduce validate_strIan Jackson2023-12-071-3/+8
| | | | | | | | | | | | This makes it more like ArtiPathComponent and will allow more unification
| * | tor-keymgr: ArtiPath tests: Add a test for a multi-component pathIan Jackson2023-12-071-2/+6
| | |
| * | tor-keymgr: ArtiPath tests: separate path from component testsIan Jackson2023-12-071-2/+4
| | | | | | | | | | | | | | | | | | Rename VALID_ARTI_PATH_COMPONENTS from _PATHS. These are tested for validity as components. I want to add a test for a multi-component path, so make a place to put it.
| * | tor-keymgr: ArtiPath::new: Rename a confusing variableIan Jackson2023-12-071-2/+2
| | | | | | | | | | | | Rebinding inner locally like this confused me.
| * | tor-keymgr: ArtiPathSyntaxError: impl EqIan Jackson2023-12-071-1/+1
| | |
| * | tor-keymgr: arti_path tests: Add two TODOsIan Jackson2023-12-071-0/+3
| | | | | | | | | | | | These don't seem critical to me.
| * | tor-keymgr: path errors: Add some xrefsIan Jackson2023-12-072-1/+9
| | |
| * | tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathError (fmt)Ian Jackson2023-12-073-12/+45
| | |
| * | tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathErrorIan Jackson2023-12-077-41/+40
| | | | | | | | | | | | | | | The previous name was ambiguous, and confusable with KeyPathError (of which it is, basically, a variant).
| * | tor-keymgr: Abolish unneeded StdResult alias in arti_pathIan Jackson2023-12-071-6/+4
| | |
| * | tor-keymgr: Move ArtiPath etc. into new module (docs links)Ian Jackson2023-12-071-2/+6
| | | | | | | | | | | | Fix docs link breakage.
| * | tor-keymgr: Move ArtiPath etc. into new moduleIan Jackson2023-12-073-191/+200
| | | | | | | | | | | | Minimal changes to still compile and pass tests.
| * | tor-keymgr: KeySpecifierComponent::to_component: rename from as_componentIan Jackson2023-12-071-7/+7
| | | | | | | | | | | | | | | | | | Normally as_... is a cheap and non-consuming (reference to reference) conversion. to_ is better here since we don't consume, but we do allocate.
| * | tor-hsservice: tests: IptKeySpecifier: Do round trip testIan Jackson2023-12-071-8/+8
| | |
| * | tor-hsservice: IptKeySpecifier: impl KeySpecifier via macroIan Jackson2023-12-071-14/+8
| | |
| * | tor-hsservice: IptKeySpecifier: make it ownedIan Jackson2023-12-072-5/+5
| | | | | | | | | | | | | | | The macro is going to want to be able to do a back-conversion from an ArtiPath, so there has to be an owned version.
| * | tor-hsservice: IptKeySpecifier: reorder fieldsIan Jackson2023-12-071-2/+2
| | | | | | | | | | | | | | | Now they are in the order they appear in the ArtiPath, which is a bit clearer.
| * | tor-hsservice: IptKeyRole: impl FromStr and KeySpecifierComponentIan Jackson2023-12-071-1/+4
| | |
| * | tor-hsservice: IptLocalId: impl KeySpecifierComponentIan Jackson2023-12-071-0/+3
| | |
| * | tor-hsservice: IptLocalId: impl FromStr (fmt)Ian Jackson2023-12-071-4/+2
| | |
| * | tor-hsservice: IptLocalId: impl FromStrIan Jackson2023-12-072-27/+18
| | | | | | | | | | | | And implement serde that way, using SerdeStringOrTransparent.
| * | tor-hsservice: Expose SerdeStringOrTransparent to crateIan Jackson2023-12-072-2/+4
| | | | | | | | | | | | | | | And make it useable elsewhere by not expecting the particular error type.
| * | tor-keymgr: Make KeySpecifierComponent::as_component fallible (fmt)Ian Jackson2023-12-071-3/+8
| | |
| * | tor-keymgr: Make KeySpecifierComponent::as_component fallibleIan Jackson2023-12-072-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a principled implentation via Display. The alternative would be to have runtime panics whenever someone uses KeySpecifierComponentViaDisplayFromStr but the Display impl can produce wrong syntax (that doesn't fit in an ArtiPathComponent). Bug seems like the right error since implemnting KeySpecifierComponent implies that every value is representable in an ArtiPathComponent.
| * | tor-keymgr: Introduce InvalidKeyPathComponentValue errors (fmt)Ian Jackson2023-12-072-11/+9
| | |