summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | tor-hsservice: Make descriptor publisher wait for shutdown signal.Gabriela Moldovan2023-12-133-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The publisher logs a nice `info!` message when it receives the shutdown signal. The publisher can infer that the service is shutting down from the errors received on its various receiver channels (i.e. from the errors that suggest the sender was dropped), but listening for the shutdown signal is nicer.
| * | | | | tor-hsservice: Move ShutdownStatus to svc.Gabriela Moldovan2023-12-132-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used by the descriptor publisher soon (we want to abolish its `ReactorError` altogether, and to do that, we need to get rid of `ReactorError::ShuttingDown`. `ShuttingDown::Terminate` happens to be a suitable replacement).
| * | | | | tor-hsservice: Remove unused ReactorError variant.Gabriela Moldovan2023-12-131-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves us one step closer to removing ReactorError in favour of FatalError (see the TODO HSS above ReactorError for more details).
| * | | | | tor-hsservice: Refactor upload_descriptor_with_retries to not return an error.Gabriela Moldovan2023-12-131-67/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, this would return `ReactorError::PublishFailure` if the upload failed. However, that error wasn't used for anything other than logging. Instead of returning the error, we now log it inside `upload_descriptor_with_retries` and return an `UploadStatus` describing the upload outcome. This will enable us to abolish `ReactorError::PublishFailure` (and eventually replace `ReactorError` with `FatalError`).
| * | | | | tor-hsservice: Abolish ReactorError::HsDescBuild.Gabriela Moldovan2023-12-132-7/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | The failure to build a descriptor out of seemingly valid parts is an internal (irrecoverable) error.
* | | | | Merge branch 'todo-hscrypto' into 'main'Alexander Færøy2023-12-131-4/+0
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | hscrypto: Remove a "TODO HSS" about a no-longer-unused type. See merge request tpo/core/arti!1817
| * | | | hscrypto: Remove a "TODO HSS" about a no-longer-unused type.Nick Mathewson2023-12-121-4/+0
| | |/ / | |/| |
* | | | Merge branch 'warn_on_dubious_hsproxy_config' into 'main'Nick Mathewson2023-12-122-9/+52
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hsproxy: warn on some dubious configurations Closes #1154 See merge request tpo/core/arti!1822
| * | | | Add NOTEs about similar code for address types.Nick Mathewson2023-12-122-1/+10
| | | | |
| * | | | hsproxy: warn on some dubious configurationsNick Mathewson2023-12-121-8/+42
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Specifically, warn about non-private target addresses and onion services with no forwarding rules at all. Removes some TODO HSS comments and closes #1154.
* | | | Merge branch 'warn_report_onion_proxy' into 'main'Ian Jackson2023-12-121-4/+1
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | arti: Use warn_report on anyhow::Error in onion_proxy See merge request tpo/core/arti!1820
| * | | arti: Use warn_report on anyhow::Error in onion_proxyNick Mathewson2023-12-121-4/+1
| |/ / | | | | | | | | | This was made possible by !1818.
* | | Merge branch 'tor_cell_todo' into 'main'Ian Jackson2023-12-121-1/+0
|\ \ \ | |/ / |/| | | | | | | | tor-cell: Remove a now-unneeded allow(unused). See merge request tpo/core/arti!1816
| * | tor-cell: Remove a now-unneeded allow(unused).Nick Mathewson2023-12-121-1/+0
| |/
* | Merge branch 'llcrypto-always-traits' into 'main'gabi-2502023-12-121-1/+0
|\ \ | | | | | | | | | | | | llcrypto: make "traits" module present unconditionally. See merge request tpo/core/arti!1815
| * | llcrypto: make "traits" module present unconditionally.Nick Mathewson2023-12-121-1/+0
| |/ | | | | | | Removes a TODO HSS, since this trait is generally useful.
* | Merge branch 'report-anyhow' into 'main'Nick Mathewson2023-12-125-4/+64
|\ \ | |/ |/| | | | | | | | | Enable use of warn_report etc with anyhow::Error Closes #1157 See merge request tpo/core/arti!1818
| * tor-error: Correct docs for ErrorReport to reflect improved situationIan Jackson2023-12-121-2/+4
| |
| * tor-error: tests: Demonstrate warn_report on bare error and anyhowIan Jackson2023-12-122-0/+38
| |
| * tor-error: ErrorReport: impl for StdError + 'staticIan Jackson2023-12-122-0/+8
| |
| * tor-error: ErrorReport: remove Sized bound from traitIan Jackson2023-12-121-1/+1
| | | | | | | | This will let us impl for dyn StdError.
| * tor-error: ErrorReport: move blanket impl code into implIan Jackson2023-12-121-2/+4
| | | | | | | | | | This impl can only compile for Self: Sized. This will let us remove the Sized bound from the trait itself.
| * tor-error: ErrorReport: sealIan Jackson2023-12-123-1/+11
| | | | | | | | | | | | We're going to need to make change to this trait which would be breaking for out-of-crate implementors. This should have been sealed all along.
* | Merge branch 'clippy' into 'main'Nick Mathewson2023-12-121-1/+1
|\ \ | | | | | | | | | | | | Fix a clippy lint See merge request tpo/core/arti!1814
| * | Fix a clippy lintIan Jackson2023-12-121-1/+1
| |/ | | | | | | | | | | | | | | | | | | warning: consider adding a `;` to the last statement for consistent formatting --> crates/tor-circmgr/src/build.rs:162:13 | 162 | handshake_res = circ.create_firsthop_ntor(ct, params).await | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `handshake_res = circ.create_firsthop_ntor(ct, params).await;` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
* | hsclient: Remove comment about tearing down circuit.Nick Mathewson2023-12-111-2/+0
| | | | | | | | This is now in the spec, with torspec!236.
* | Merge branch 'todo_hsrproxy' into 'main'Nick Mathewson2023-12-115-35/+58
|\ \ | | | | | | | | | | | | Resolve several TODO HSS items in hsrproxy See merge request tpo/core/arti!1809
| * | Apply 1 suggestion(s) to 1 file(s)Ian Jackson2023-12-111-0/+2
| | |
| * | hsrproxy: replace "TODO HSS" instances with references to #1154Nick Mathewson2023-12-071-3/+8
| | | | | | | | | | | | | | | (These are the ones about warning on questionable configuration choices.)
| * | hsproxy: Downgrade a TODO.Nick Mathewson2023-12-071-1/+1
| | | | | | | | | | | | | | | "We might someday want to do X" does not really rise to the level of a "must-fix".
| * | hsrproxy: Log rate-limited failures of other types as wellNick Mathewson2023-12-071-22/+18
| | | | | | | | | | | | | | | We separate these from our failures to connect to a local proxy, since that is a much more common error.
| * | hsproxy: remove TODO about retroactive limitsNick Mathewson2023-12-071-1/+1
| | | | | | | | | | | | | | | See arti#1153 for followup work here. The current behavior is IMO a decent default.
| * | hsrproxy: Remove TODO about empty Connected messagesNick Mathewson2023-12-071-1/+0
| | | | | | | | | | | | See torspec!237
| * | hsproxy: Add a rate-limited log for forwarding errors.Nick Mathewson2023-12-072-5/+10
| | |
| * | hsrproxy: Reformat Cargo.toml.Nick Mathewson2023-12-071-1/+2
| | |
| * | hsrproxy: Take nickname as an argument and pass it to forwarding functionNick Mathewson2023-12-073-5/+20
| | | | | | | | | | | | We'll use this for logging.
* | | Merge branch 'desc-note-publication' into 'main'gabi-2502023-12-112-152/+143
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | tor-hsservice: Publish the IptPublishSet we called note_publication_attempt on Closes #1097 See merge request tpo/core/arti!1805
| * | tor-hsservice: Reformat long match statement.Gabriela Moldovan2023-12-111-1/+3
| | |
| * | tor-hsservice: Reformat a long trace! statement.Gabriela Moldovan2023-12-111-1/+3
| | |
| * | tor-hsservice: Rephrase and reformat a comment.Gabriela Moldovan2023-12-111-2/+2
| | | | | | | | | | | | This line is too long.
| * | tor-hsservice: Remove duplicate trace! log.Gabriela Moldovan2023-12-111-5/+0
| | | | | | | | | | | | | | | We already log the outcome of the HsDir upload in the function that calls this code.
| * | tor-hsservice: Use debug! instead of trace! to log upload outcome.Gabriela Moldovan2023-12-111-1/+1
| | | | | | | | | | | | This also wraps the line.
| * | tor-hsservice: Remove some TODOs that have been addressed.Gabriela Moldovan2023-12-111-11/+0
| | |
| * | tor-hsservice: Publish the IptPublishSet we called note_publication_attempt on.Gabriela Moldovan2023-12-111-50/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, it was possible for the `IptPublishSet` used to generate the descriptor and the `IptPublishSet` `note_publication_attempt` to differ. Now, the publisher generates the descriptor using the same `IptPublishSet` it calls `note_publication_attempt` on. Note that as a consequence, the publisher generates a new descriptor just before _each_ HsDir upload. This means each HsDir could, in theory, receive a different descriptor (not just in terms of revision-counters, but also with a different set of IPTs). It may seem like this could lead to some HsDirs being left with an outdated descriptor, but that's not the case: after the upload completes, the publisher will be notified by the ipt_watcher of the IPT change event (if there was one to begin with), which will trigger another upload job. Previously, the publisher would only generate a single descriptor for each time period (all HsDirs in a given time period would receive the same descriptor). Closes #1097
| * | tor-hsservice: Move revision_counter to HsDirUploadResult.Gabriela Moldovan2023-12-111-5/+5
| | | | | | | | | | | | | | | | | | This was previously in `TimePeriodUploadResult`. We will soon have different revision_counter for each `HsDirUploadResult`, so let's preemptively move the field there.
| * | tor-hsservice: Make build_sign also return the revision counter used.Gabriela Moldovan2023-12-112-10/+11
| | |
| * | tor-hsservice: Derive Clone for VersionedDescriptor.Gabriela Moldovan2023-12-111-0/+1
| | | | | | | | | | | | We're going to need to clone it soon.
| * | tor-hsservice: Move generate_revision_counter to Immutable.Gabriela Moldovan2023-12-111-74/+75
| | | | | | | | | | | | | | | | | | | | | | | | `generate_revision_counter` and `create_ope_key` don't use anything from `self` other than `imm`, so they might as well be methods on `Immutable`. This change is needed because we're soon going to need to use `generate_revision_counter` from an associated `Reactor` function (where we don't have `self`).
* | | hsrproxy: Add a test for the contents of a parsed configuration.Nick Mathewson2023-12-111-1/+34
|/ /
* | Merge branch 'local-resource-error' into 'main'Ian Jackson2023-12-111-0/+22
|\ \ | | | | | | | | | | | | tor-error: Introduce ErrorKind::LocalResourceAlreadyInUse See merge request tpo/core/arti!1775