summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/svc
Commit message (Collapse)AuthorAgeFilesLines
* tor-hsservice: reconfigure: Allow changing rate_limit_at_introIan Jackson2024-02-211-0/+2
|
* tor-hsservice: Clarify what UploadError::Stream is for.Gabriela Moldovan2024-02-201-1/+1
|
* tor-hsservice: Clarify what UploadError::Timeout is used for.Gabriela Moldovan2024-02-201-2/+2
|
* tor-hsservice: Log descriptor upload request errors.Gabriela Moldovan2024-02-191-1/+1
|
* tor-hsservice: Report a clearer error message for UploadError::Circuit.Gabriela Moldovan2024-02-191-1/+1
| | | | | | | | | | | | This errors such as ``` DEBUG tor_hsservice::svc::publish::backoff: failed to upload a hidden service descriptor: circuit failed attempt=2 can_retry=true ``` into ``` DEBUG tor_hsservice::svc::publish::backoff: failed to upload a hidden service descriptor: could not build circuit to HsDir attempt=2 can_retry=true ```
* tor-hsservice: Replace placeholder IptError with the real IptError type.Gabriela Moldovan2024-02-191-1/+2
|
* tor-hsservice: Include the IptError in IptStatusStatus::Faulty.Gabriela Moldovan2024-02-191-21/+26
| | | | | | This will enable the `IptManager` to more accurately report its status. Part of #1083
* tor-hsservice: Move certain IptEstablisherErrors to a separate enum (fmt).Gabriela Moldovan2024-02-191-3/+7
|
* tor-hsservice: Move certain IptEstablisherErrors to a separate enum.Gabriela Moldovan2024-02-191-28/+44
| | | | | | | | | | The new `IptError` type represents an IPT error that is definitely caused by a bad IPT. `IptError` will be made public and exposed through a variant of the `Problem` enum used for status reporting. Part of #1083
* tor-hsservice: Rename IptError to IptEstablisherError.Gabriela Moldovan2024-02-191-19/+19
| | | | | | We are about to add a new `IptError` type that is only for errors that are the IPT's fault (the ones `IptEstablisherError::is_ipt_failure()` returns `true` for).
* tor-hsservice: Rename note_<status> to send_<status>.Gabriela Moldovan2024-02-191-3/+3
| | | | | Since these are `*StatusSender` APIs, it seems more idiomatic to call them `send*`.
* tor-hsservice: The publisher should process all upload results.Gabriela Moldovan2024-02-141-1/+2
| | | | | | If one of the upload results is for an HsDir that went away, the publisher should continue processing the remaining ones, not disregard them entirely.
* tor-hsservice: Add a TODO about using HashMap for the reupload_timers.Gabriela Moldovan2024-02-121-0/+4
|
* tor-hsservice: Fix typo in comment.Ian Jackson2024-02-121-1/+1
|
* tor-hsservice: Add test for desc publisher reuploads.Gabriela Moldovan2024-02-121-3/+41
| | | | Part of #1241
* tor-hsservice: Remove unnecessary locking in test.Gabriela Moldovan2024-02-121-8/+8
|
* tor-hsservice: Add a publisher TODO about limiting reuploads.Gabriela Moldovan2024-02-121-0/+7
|
* tor-hsservice: Periodically reupload the descriptor.Gabriela Moldovan2024-02-122-3/+32
| | | | | | | | | | | | | | | | | According to the spec, the publisher needs to periodically reupload the descriptor. ``` Specifically, every time a hidden service publishes its descriptor, it also sets up a timer for a random time between 60 minutes and 120 minutes in the future. When the timer triggers, the hidden service needs to publish its descriptor again to the responsible HSDirs for that time period. [TODO SPEC: Control republish period using a consensus parameter?] ``` After each `upload_for_time_period()`, the publisher now sets a timer as described in the spec, by pushing a `ReuploadTimer` into its `reupload_timers` heap. Closes #1241
* tor-hsservice: Set the status to UploadScheduled when it's time to reupload.Gabriela Moldovan2024-02-121-0/+45
|
* tor-hsservice: Add helper type for scheduling descriptor reuploads.Gabriela Moldovan2024-02-122-0/+113
|
* tor-hsservice: Add a function for marking descriptors dirty for a specific TP.Gabriela Moldovan2024-02-121-0/+20
| | | | | | | We will soon need the ability to trigger a descriptor reupload for a specific time period. Part of #1241
* 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
| |