aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'partial-eqs' into 'main'Alexander Færøy2023-09-192-3/+3
|\ | | | | | | | | tor-hsservice: Implement PartialEq for HsClientDescEncKey, Anonimity, DescEncryptionConfig See merge request tpo/core/arti!1601
| * tor-hsservice: Derive PartialEq for Anonimity and DescEncryptionConfig.Gabriela Moldovan2023-09-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | This will enable the descriptor publisher to tell whether it needs to update the descriptor. When the publisher is notified of an `OnionServiceConfig` change, it checks whether the `anonimity` or `encrypt_descriptor` fields have changed. If they have, it rebuilds and republishes the descriptor using the new values (note: the publisher changes will be implemented in a future commit).
* | Merge branch 'ipt-accepting' into 'main'Nick Mathewson2023-09-181-29/+58
|\ \ | |/ |/| | | | | tor-hsservice: ipt mgr: Notify Establisher to start accepting See merge request tpo/core/arti!1598
| * tor-hsservice: ipt mgr: Apply deferred rustfmt churnIan Jackson2023-09-181-3/+1
| |
| * tor-hsservice: ipt mgr: Remove some allowsIan Jackson2023-09-181-4/+0
| |
| * tor-hsservice: ipt mgr: Instruct Establisher to start acceptingIan Jackson2023-09-181-1/+12
| |
| * tor-hsservice: ipt mgr: Introduce ErasedIptEstablisher aliasIan Jackson2023-09-181-4/+7
| | | | | | | | We're going to want to talk about this in the Mockable trait.
| * tor-hsservice: ipt mgr: Break apart publish_setIan Jackson2023-09-181-10/+26
| | | | | | | | | | | | | | | | The call site is going to want to do something other with the selected IPTs than just publish them. (This seems better than putting the Establisher notification in a function called `publish_set`.)
| * tor-hsservice: ipt mgr: Move `expires` bindingIan Jackson2023-09-181-8/+8
| | | | | | | | | | | | We're going to split this function, and this will be in the 2nd half. Code motion only.
| * tor-hsservice: ipt mgr: Split out publish None handlingIan Jackson2023-09-181-4/+9
| | | | | | | | | | We want a separate block so we can do other things besides just making an IptPublishSet.
* | Merge branch 'mock-advance' into 'main'Ian Jackson2023-09-182-1/+3
|\ \ | |/ |/| | | | | tor-rtmock: task: Provide advance_* to replace advance See merge request tpo/core/arti!1594
| * tor-hsservice: publish backoff tests: Add an allowIan Jackson2023-09-181-0/+1
| |
| * tor-hsservice: timeout_track test: Use advance_byIan Jackson2023-09-181-1/+2
| |
* | Merge branch 'ipt-misc' into 'main'Nick Mathewson2023-09-184-53/+44
|\ \ | | | | | | | | | | | | tor-hsservice: Pass correct parameters to Establisher See merge request tpo/core/arti!1597
| * | tor-hsservice: Apply deferred rustfmt churnIan Jackson2023-09-181-5/+1
| | |
| * | tor-hsservice: ipt mgr: Drop Mockable::new_intro_pointsIan Jackson2023-09-181-5/+0
| | | | | | | | | | | | | | | | | | We don't need this because the manager takes an IptsManagerView which can be connected to something other than a real publisher (and is pretty good at passing on the info).
| * | tor-hsservice: Pass correct parameters to EstablisherIan Jackson2023-09-181-5/+4
| | |
| * | tor-hsservice: Wrap k_hs_ipt_sid in an ArcIan Jackson2023-09-182-6/+12
| | |
| * | tor-hsservice: TODO HSS-IPT-PERSIST: make a new specific todoIan Jackson2023-09-181-6/+6
| | | | | | | | | | | | This is the persistent IPT feature.
| * | tor-hsservice: ipt mgr: Code motion needed to actually make iptIan Jackson2023-09-181-10/+10
| | | | | | | | | | | | We must generate keys and so on before we can set up an Establisher.
| * | tor-hsservice: Unify ids as IptLocalId replacing IntroPointIdIan Jackson2023-09-184-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IntroPointId was RelayIds but that's wrong, because there can be different IPTs at the same relay - but also because an established IPT might change its RelayIds. Use IptLocalId instead, which I think is the type we decided to use for this, and which is, conveniently, Copy. And change the variable names to match, everywhere. Specifically: in places where an intro point is implied (ipt_mgr.rs, ipt_establish.rs) use the name `lid` everywhere, like in ipt_mgr.rs. Elsewhere, use `ipt_lid`. (We could use a longer name, but in that case it should be changed in ipt_mgr.rs too.) No actual functional change in this commit.
| * | tor-hsservice: Use correct name for k_hs_ipt_sid variableIan Jackson2023-09-182-7/+8
| |/ | | | | | | | | | | | | Local variables can have contextually implied elements omitted. In this case that's `hs` and `ipt`, leaving `k_sid` as in ipt_mgr.rs. Put the full name in the doc comment.
* | Merge branch 'ipt-set-2' into 'main'Ian Jackson2023-09-182-28/+257
|\ \ | |/ |/| | | | | tor-hsservice: Implement ipt_set See merge request tpo/core/arti!1577
| * tor-hsservice: ipt_set: Add some testsIan Jackson2023-09-181-0/+117
| |
| * tor-hsservice: ipt_set: note_publication_attempt: fmt bodgeIan Jackson2023-09-181-0/+1
| | | | | | | | Defend against rustfmt worsifying this by adding an empty comment.
| * tor-hsservice: ipt_set: note_publication_attempt: renameIan Jackson2023-09-181-3/+3
| | | | | | | | | | | | From ..._start. The old name is confusing when you see a call site, because the actual time passed isn't the start time, but the call site looks like it ought to be.
| * tor-hsservice: ipt_set: note_publication_attempt_start: implementIan Jackson2023-09-181-2/+28
| | | | | | | | This gains an almost impossible error case.
| * tor-hsservice: ipt_set: principal implementationIan Jackson2023-09-181-14/+91
| |
| * tor-hsservice: ipt_set: make await_update take &mut selfIan Jackson2023-09-181-1/+1
| | | | | | | | This is needed since the notification channel will be an mpsc.
| * tor-hsservice: Add a block to run_onceIan Jackson2023-09-181-9/+16
| |
| * tor-hsservice: Make IptSet be DebugIan Jackson2023-09-181-0/+1
| |
* | Merge branch 'make_hss_ntor_key' into 'main'Nick Mathewson2023-09-181-23/+8
|\ \ | |/ |/| | | | | | | | | Define a keypair type for HsSvcNtor{,Secret}Key, and use it in ipt_mgr. Closes #1030 See merge request tpo/core/arti!1590
| * Add a note about how the K_hss_ntor is passed.Nick Mathewson2023-09-171-0/+4
| |
| * ipt_mgr: use HsSvcNtorKeypair.Nick Mathewson2023-09-171-23/+4
| | | | | | | | Closes #1030.
* | Merge branch 'desc-publisher-retries' into 'main'gabi-2502023-09-143-56/+587
|\ \ | | | | | | | | | | | | tor-hsservice: Implement upload_descriptor_with_retries. See merge request tpo/core/arti!1592
| * | tor-hsservice: Use Either to simplify timeout logic (fmt).Gabriela Moldovan2023-09-131-1/+2
| | |
| * | tor-hsservice: Use Either to simplify timeout logic.Gabriela Moldovan2023-09-131-48/+16
| | | | | | | | | | | | | | | | | | We don't really need a separate task for handling timeouts, we can just create an `Either` future (one of the variants represents the timeout future, while the other is the forever pending, "no timeout" option).
| * | tor-hsservice: Remove extraneous whitespace.Gabriela Moldovan2023-09-131-1/+1
| | |
| * | tor-hsservice: Use warn_report! instead of error!.Gabriela Moldovan2023-09-131-4/+6
| | |
| * | tor-hsservice: Add more details to the backoff runner docs.Nick Mathewson2023-09-131-0/+4
| | |
| * | tor-hsservice: Implement upload_descriptor_with_retries.Gabriela Moldovan2023-09-131-7/+43
| | |
| * | tor-hsservice: Share the immutable reactor state with ↵Gabriela Moldovan2023-09-131-1/+8
| | | | | | | | | | | | upload_descriptor_with_retries.
| * | tor-hsservice: Put the shared reactor state in a new struct.Gabriela Moldovan2023-09-131-29/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | This state will be shared with the task spawned by `Reactor::upload_descriptor_with_retries()`. We need this refactoring because `upload_with_descriptor_with_retries` is not a `&self` method but requires several fields from `Reactor` (currently just `runtime`, `mockable`, `hsid`).
| * | tor-hsservice: Implement a BackoffSchedule for the descriptor publisher.Gabriela Moldovan2023-09-131-0/+35
| | |
| * | tor-hsservice: Split UploadError out of ReactorError.Gabriela Moldovan2023-09-131-9/+36
| | |
| * | tor-hsservice: Remove stray must_use.Gabriela Moldovan2023-09-131-1/+0
| | |
| * | tor-hsservice: Remove unused type parameter.Gabriela Moldovan2023-09-131-4/+4
| | |
| * | tor-hsservice: Introduce helpers for implementing a backoff schedule.Gabriela Moldovan2023-09-132-0/+424
| | |
| * | tor-hsservice: Log an error! if the descriptor upload fails (fmt).Gabriela Moldovan2023-09-131-2/+1
| | |
| * | tor-hsservice: Log an error! if the descriptor upload fails.Gabriela Moldovan2023-09-131-6/+24
| | |