aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tor-hsservice: Recover from partial writesIan Jackson2024-01-251-2/+29
| | | | | | | | | | | | Fixes #1207.
* | | tor-hsservice: replay: Introduce an EH IEFE (fmt)Ian Jackson2024-01-251-2/+1
| | |
* | | tor-hsservice: replay: Introduce an EH IEFEIan Jackson2024-01-251-7/+11
| | | | | | | | | | | | | | | We're going to want to do more things here, all of which want the same error handling.
* | | tor-hsservice: replay: Combine PersistFileIan Jackson2024-01-251-16/+25
| | | | | | | | | | | | | | | This combines two logically-parallel options. Also, it provides us a place to put another piece of information we want in a moment.
* | | tor-hsservice: replay: Break out truncate_to_multipleIan Jackson2024-01-251-8/+13
| | |
* | | tor-hsservice: replay: Break up a paragraphIan Jackson2024-01-251-1/+3
| |/ |/|
* | tor-hsservice: Fix a broken doc link.Gabriela Moldovan2024-01-251-1/+1
| |
* | Merge branch 'publisher_consts' into 'main'gabi-2502024-01-252-34/+66
|\ \ | | | | | | | | | | | | | | | | | | Resolve comments about publisher constants Closes #1121 See merge request tpo/core/arti!1911
| * | Typo fixes.gabi-2502024-01-241-2/+2
| | |
| * | hss: Use estimator to determine a timeout for an hsdir uploadNick Mathewson2024-01-242-5/+29
| | | | | | | | | | | | This should give us better behavior if the network is slow.
| * | hss: Revise timeout code for upload attemptsNick Mathewson2024-01-241-30/+34
| | | | | | | | | | | | | | | | | | | | | Now we have clearer-named constants for overall and individual timeouts, and we use them in the right places. Closes #1121.
| * | hss: Downgrade comments on some publisher constants.Nick Mathewson2024-01-241-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | These may need tuning eventually, but there's no reason to think that we have a better guess now. (They don't correspond to anything that C tor does, so we don't have that to guide us.) Part of #1121; see there for some more discussion.
* | | Merge branch 'state' into 'main'Ian Jackson2024-01-243-587/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Move state_dir to tor_persist and start to implement it Closes #1205 See merge request tpo/core/arti!1913
| * | | state-dir: Move from tor-hsservice to tor-persistIan Jackson2024-01-243-587/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | And, instead of being a hidden module, it's a public experimental one. I have feature-gated all the new dependencies since we probably want to feature-gate this module in perpetuity, since some builds of Arti won't need it. Closes #1205
* | | Merge branch 'onion-svc-status' into 'main'gabi-2502024-01-248-97/+258
|\ \ \ | | | | | | | | | | | | | | | | tor-hsservice: Make the publisher update the `OnionServiceStatus` See merge request tpo/core/arti!1902
| * | | tor-hsservice: Explain why the publisher never transitions to Recovering.Gabriela Moldovan2024-01-241-0/+48
| | | |
| * | | tor-hsservice: Update the IptManager status.Gabriela Moldovan2024-01-241-2/+7
| | | |
| * | | tor-hsservice: Remove Publisher::status().Gabriela Moldovan2024-01-241-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The publisher status is obtained via `StatusSender` (rather than by polling `Publisher::status()`). Part of #1083
| * | | tor-hsservice: Remove some TODOs about setting the OnionService status.Gabriela Moldovan2024-01-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the status of the `OnionService` is derived from the statuses of its subcomponents. Their initial status will be `Shutdown`, so we don't need to explicitly initialize it. As for setting the status when `RunnionOnionService::launch` fails, I don't think that's necessary: `launch()` returns an error on failure, so the user will know about it (it doesn't need to watch the stream of status events to find out it failed). Part of #1083
| * | | tor-hsservice: Change TODO to reference #1194.Gabriela Moldovan2024-01-241-2/+2
| | | | | | | | | | | | | | | | This isn't something we need to do for #1083.
| * | | tor-hsservice: Map the publisher status to a State variant.Gabriela Moldovan2024-01-241-1/+8
| | | |
| * | | tor-hsservice: Update the publisher state on shutdown.Gabriela Moldovan2024-01-241-2/+10
| | | |
| * | | tor-hsservice: Implement {Publisher, IptMgr}StatusSender.Gabriela Moldovan2024-01-241-23/+54
| | | |
| * | | tor-hsservice: Implement OnionServiceStatus::current_problem.Gabriela Moldovan2024-01-241-1/+9
| | | |
| * | | tor-hsservice: Rename OnionServiceStatus fields.Gabriela Moldovan2024-01-241-7/+7
| | | | | | | | | | | | | | | | The new names are shorter and just as descriptive.
| * | | tor-hsservice: Remove outdated TODO.Gabriela Moldovan2024-01-241-2/+0
| | | |
| * | | tor-hsservice: Add separate status structs for the svc subsystems.Gabriela Moldovan2024-01-241-7/+48
| | | |
| * | | tor-hsservice: Replace StartupError with Problem.Gabriela Moldovan2024-01-241-10/+16
| | | |
| * | | tor-hsservice: Make UploadError public.Gabriela Moldovan2024-01-244-1/+4
| | | | | | | | | | | | | | | | | | | | We need it to be public, because we're about to expose it in the `OnionServiceStatus`.
| * | | tor-hsservice: Implement Into<RetryError<E>> for BackoffError.Gabriela Moldovan2024-01-241-0/+11
| | | | | | | | | | | | | | | | | | | | We're about to report the inner error in the `OnionServiceStatus` (without making `BackoffError` public).
| * | | tor-hsservice: Remove unused BackoffError variants.Gabriela Moldovan2024-01-241-31/+1
| | | | | | | | | | | | | | | | They're not used anywhere, so let's remove them.
| * | | tor-hsservice: Reassign a TODO to #1194.Gabriela Moldovan2024-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | The key expiration status is only relevant if the service is running in "offline mode", so these TODOs should be part of #1194.
| * | | tor-hsservice: Remove unused field.Gabriela Moldovan2024-01-241-4/+0
| | | | | | | | | | | | | | | | This field is unused now that we have `ipt_mgr_state` and `publisher_state`.
| * | | tor-hsservice: Give the IptManager a StatusSender.Gabriela Moldovan2024-01-242-0/+15
| | | | | | | | | | | | | | | | Part of #1083
| * | | tor-hsservice: Give the publisher a StatusSender.Gabriela Moldovan2024-01-243-0/+20
| | | | | | | | | | | | | | | | The publisher needs it to notify `OnionService` of status changes.
| * | | tor-hsservice: Add separate StatusSender types for the publisher and IPT mgr.Gabriela Moldovan2024-01-241-0/+10
| |/ / | | | | | | | | | | | | | | | For updating the underlying component statuses of an `OnionServiceStatus. Part of #1083
* | | Merge branch 'hss_errorkinds' into 'main'Nick Mathewson2024-01-243-43/+44
|\ \ \ | |/ / |/| / | |/ | | | | | | hsservice: Fix some errorkinds and related error handling issues. Closes #1225 See merge request tpo/core/arti!1906
| * hss: Report errors from keep_intro_established.Nick Mathewson2024-01-241-3/+3
| | | | | | | | | | Also, change `keep_intro_established`'s return type to indicate that it has no non-failing return cases.
| * hss: Refactor keep_intro_established to avoid needing NetDirNick Mathewson2024-01-241-22/+9
| | | | | | | | | | | | | | | | We already have the NetDir in establish_intro_once, so we might as well use it to get the intro-point details there. This confirms that we will not need IptError::NoNetdir, since we use wait_for_netdir in establish_intro_once.
| * hss: Downgrade MissingHsIdKeypair TODONick Mathewson2024-01-241-1/+1
| | | | | | | | | | This is not typically wrong, but it may become wrong if we do not tidy up MissingHsIdKeypair in the future. The TODO now refers to
| * hss: Change ticket about ErrorKind for IntroPointNotListedNick Mathewson2024-01-241-1/+1
| | | | | | | | This is now #1255, which is not a MUST.
| * hss: Clean up errors while expecting intro_establishedNick Mathewson2024-01-241-11/+25
| | | | | | | | Part of #1225, also #1237.
| * hss: Correct the Kind for EstablishTimeout.Nick Mathewson2024-01-241-1/+1
| |
| * hss: Return LocalResourceAlreadyInUse on StateLocked.Nick Mathewson2024-01-231-2/+1
| |
| * hss: Return summarized errorkind for RendCirc error.Nick Mathewson2024-01-231-2/+3
| |
* | tor-hsservice: Fix typos etc.gabi-2502024-01-241-2/+2
| |
* | tor-hsservice: key expiry: Code motion and reindentingIan Jackson2024-01-241-26/+22
| | | | | | | | | | Now the remove_if_expire closure, which does the actual work, is lexically outside the macro, and the macro is trivial.
* | tor-hsservice: key expiry: Introduce HsTimePeriodKeySpecifier traitIan Jackson2024-01-241-10/+49
| | | | | | | | | | | | This allows us to have a closure containing runtime-polymorphic code, reducing monomorphisation and moving code out of a macro into a closure.
* | tor-hsservice: key expiry: Rely on limiting publisher key scanIan Jackson2024-01-241-2/+6
| | | | | | | | | | | | | | | | Our pattern is now supposed to ensure that we don't see any irrelevant keys. So if we do, that's a bug. (The code layout is getting increasingly odd. We'll sort that out along with some code motion later.)
* | tor-hsservice: key expiry: Limit publisher key scanIan Jackson2024-01-241-5/+5
| | | | | | | | | | | | | | Only examine keys for this HS. This avoids thinking about every key for every HS for every netdir change. That's quadratic in the number of HS's.