summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/svc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'keymgr-generate' into 'main'gabi-2502024-02-012-26/+31
|\ | | | | | | | | | | | | tor-keymgr: A handful of API fixes Closes #1194 and #1074 See merge request tpo/core/arti!1948
| * tor-hsservice: Use FatalError::KeystoreRace where possible (fmt).Gabriela Moldovan2024-02-011-4/+8
| |
| * tor-hsservice: Use FatalError::KeystoreRace where possible.Gabriela Moldovan2024-02-011-5/+6
| |
| * tor-hsservice: Fix typo in error message.Gabriela Moldovan2024-02-011-1/+1
| |
| * tor-hsservice: Use read_blind_id_keypair instead of duplicating code.Gabriela Moldovan2024-02-011-16/+6
| |
| * tor-hsservice: Rewrite blind_id_keypair without get_or_generate_with_derived.Gabriela Moldovan2024-02-011-8/+18
| | | | | | | | We are about to remove `KeyMgr::get_or_generate_with_derived`.
* | tor-hsservice: Apply deferred cargo fmt.Gabriela Moldovan2024-02-011-8/+5
| |
* | tor-hsservice: Remove unnecessary trace! log.Gabriela Moldovan2024-02-011-1/+0
| |
* | tor-hsservice: Remove old upload rate-limiting code.Gabriela Moldovan2024-02-011-97/+1
| |
* | tor-hsservice: Reimplement upload rate-limiting using TrackingNow.Gabriela Moldovan2024-02-011-2/+16
| | | | | | | | | | | | | | | | | | | | | | This simplifies the publisher code in preparation for #1241 This replaces the overly complicated task-based approach to rate-limiting with a simpler one, where the publisher has: * a separate `RateLimited` state that indicates it is rate-limited, and for how long * an additional arm in its `run_once()` `select_biased!`, which checks if the rate-limit has expired
* | tor-hsservice: Update docs with the new RateLimited state.Gabriela Moldovan2024-02-011-10/+10
| |
* | tor-hsservice: Add functions for starting/stopping the rate-limiting.Gabriela Moldovan2024-02-011-0/+22
| |
* | tor-hsservice: Add a RateLimited publisher status.Gabriela Moldovan2024-02-011-9/+36
| |
* | tor-hsservice: Remove an unnecessary TODO.Gabriela Moldovan2024-02-011-4/+0
| | | | | | | | | | We _do_ schedule the rate-limited upload at `now + UPLOAD_RATE_LIM_THRESHOLD`, see `schedule_rate_lim_upload()`.
* | tor-hsservice: Downgrade a warn! to debug!.Gabriela Moldovan2024-02-011-2/+2
|/ | | | | This shouldn't be a warning (it's logged when the reactor is shutting down, not when it crashes).
* tor-hsservice: tests: create_storage_handles: use a real directory (churn)Ian Jackson2024-02-011-1/+1
| | | | Mandatory use line shuffling.
* tor-hsservice: tests: create_storage_handles: use a real directory (fmt)Ian Jackson2024-02-011-1/+5
|
* tor-hsservice: tests: create_storage_handles: use a real directoryIan Jackson2024-02-011-4/+6
| | | | | | | state_dir doesn't have the in-memory dummy implementation, so there will have to be a real directory here. Do that now, as prep.
* Merge branch 'ipt_parameters' into 'main'Nick Mathewson2024-01-312-2/+2
|\ | | | | | | | | | | | | Clean up, tune, and correct various parameters related to introduction points. Closes #1210 See merge request tpo/core/arti!1924
| * Base INTRO_POINT_EXPIRY_SLOP on OVERALL_UPLOAD_TIMEOUT.Nick Mathewson2024-01-252-2/+2
| | | | | | | | See discussion at #1210, "question 5".
* | tor-hsservice: Downgrade a debug message to trace.Gabriela Moldovan2024-01-261-1/+4
| |
* | tor-hsservice: Abort any pending desc uploads if shutting down.Gabriela Moldovan2024-01-261-4/+46
| | | | | | | | | | | | | | | | `Reactor::upload_for_time_period` now exits as soon as the Reactor is dropped (its upload tasks check if `shutdown_tx` was dropped before proceeding). Closes #1253
* | tor-hsservice: Add an UploadError type for interruption due to shutdown.Gabriela Moldovan2024-01-261-0/+12
| | | | | | | | | | This error will be returned if an upload is aborted because the reactor shutting down.
* | tor-hsservice: Document how the publisher tasks are shut down.Gabriela Moldovan2024-01-261-0/+7
| | | | | | | | Part of #1253
* | HSS: Mark an Ipt as faulty if it fails continuously for 15 minutes.Nick Mathewson2024-01-251-6/+23
| | | | | | | | Closes #1248.
* | Merge branch '1237_fixes' into 'main'Ian Jackson2024-01-251-7/+38
|\ \ | |/ |/| | | | | | | | | Clean up some error-handling issues in ipt_establisher Closes #1237 See merge request tpo/core/arti!1916
| * Remove a comment about distinguishing errorsNick Mathewson2024-01-241-2/+3
| | | | | | | | (Replace it with a better comment.)
| * hss: Comment on use of CircProto error in MsgHandler.Nick Mathewson2024-01-241-2/+12
| |
| * hss: Report failures to send rendezvous requestsNick Mathewson2024-01-241-3/+23
| |
* | 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 'onion-svc-status' into 'main'gabi-2502024-01-243-46/+94
|\ \ \ | | | | | | | | | | | | | | | | 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: 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: 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: Make UploadError public.Gabriela Moldovan2024-01-242-1/+2
| | | | | | | | | | | | | | | | | | | | 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: Give the publisher a StatusSender.Gabriela Moldovan2024-01-242-0/+17
| |/ / | | | | | | | | | The publisher needs it to notify `OnionService` of status changes.
* | | Merge branch 'hss_errorkinds' into 'main'Nick Mathewson2024-01-242-40/+42
|\ \ \ | |/ / |/| / | |/ | | | | | | 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: 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
| |