summaryrefslogtreecommitdiff
path: root/crates/tor-hsclient/src/connect.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'refactor_stream_crypto_init' into 'main'Nick Mathewson2024-03-261-4/+2
|\ | | | | | | | | Refactor the logic for constructing crypt layers. See merge request tpo/core/arti!2048
| * Refactor the logic for constructing crypt layers.Nick Mathewson2024-03-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | The key insights here are: - That relay cell format and crypto protocols aren't orthogonal: Once we have GCO, it will require V1. - That we only need the actual functions for layer construction to be generic; we don't need to proliferate generic parameters everywhere. - That the circuit::handshake module already does most of what we want.
* | tor-rtcompat: CompoundRuntime: Add a CoarseTimeProvider, and implIan Jackson2024-03-251-0/+1
|/ | | | | | In all the uses in-crate, this is just a RealCoarseTimeProvider. Now all the compound runtimes impl CoarseTimeProvider.
* Propagate RelayCellFormat selection up to where format decisions will be madeJim Newsome2024-03-201-2/+4
|
* hsclient: Clarify "hs_hops" to avoid confusion.Nick Mathewson2024-03-141-6/+11
| | | | | | | With the new structure here, it's less likely that somebody will think this is the length of a circuit that we are building. See #1332 for an instance of what we're trying to prevent.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* tor-circmgr: Add UniqId to CircTimeout.Gabriela Moldovan2024-02-271-1/+1
| | | | Part of #1297
* tor-netdir: Make hs_dirs_{upload, download} take separate args instead of tuple.Gabriela Moldovan2024-01-241-1/+2
| | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1904#note_2987777
* hsclient: Remove comment about tearing down circuit.Nick Mathewson2023-12-111-2/+0
| | | | This is now in the spec, with torspec!236.
* hsclient: Clean up some TODOs about parallelism.Nick Mathewson2023-12-051-7/+8
| | | | | | | | * Be a little more specific about what is being parallelized. * Remove TODOs about specs, in favor of torspec#244. * Note some other issues surrounding some of the cases. (See discussions of points 3-6 at #913)
* Fix typo in argumentshalcyon2023-10-201-1/+1
|
* hsclient: add a missing ) to a message.Nick Mathewson2023-10-171-1/+1
|
* dirclient: Seal the Requestable trait and hide most of its members.Nick Mathewson2023-10-171-1/+1
| | | | | | | | Since none of these methods were invoked from outside `tor-dirclient` (except for debugging), and since we have had a fair amount of churn on what we actually want them to be, it seems like a good idea to use this trick to hide them. This will let us make other changes to the actual behavior of Requestable in the future.
* tor-hsclient, arti-client, tor-keymgr, tor-netdoc: Use a keypair instead of ↵Gabriela Moldovan2023-09-251-6/+2
| | | | StaticSecret (fmt).
* tor-hsclient, arti-client, tor-keymgr, tor-netdoc: Use a keypair instead of ↵Gabriela Moldovan2023-09-251-7/+7
| | | | | | | | | | | | | StaticSecret. Previously, when retrieving `KS_hsc_desc_enc` keys (or any other x25519 keys) from the keystore, the keymgr would discard the public part of the key (SSH private keys contain the public part of the key too). Instead of discarding the public key and returning just the `StaticSecret`, the keymgr now returns a `StaticKeypair`. This makes the x25519 `EncodableKey`/`ToEncodableKey` implementation consistent with the ed25519 one (which retrieves key pairs rather than "unescorted" secrets).
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* tor-netdir: Use an owned HsBlindId instead of a reference.Gabriela Moldovan2023-08-221-1/+1
| | | | `HsBlindId` is `Copy`.
* tor-hsclient: Use hs_dirs_download instead of the deprecated hs_dirs.Gabriela Moldovan2023-08-221-6/+5
|
* tor-dirclient: Rename download() to send_request().Gabriela Moldovan2023-08-161-1/+1
| | | | | | `download()` is actually a general-purpose function for sending HTTP requests on a stream. We will soon repurpose it for `POST`-ing descriptors, so let's rename it to `send_request`.
* tor-proto: Add ClientCirc::start_conversation().Gabriela Moldovan2023-08-041-3/+4
| | | | | | | | | | | This will enable hidden services to send `RENDEZVOUS1` messages to the `N`th hop of the circuit rather than the `N + 1`th virtual one (which can only used after the client and service have completed the introduction handshake). This also deprecates `start_conversation_last_hop`. Closes #959
* Run cargo +nightly fmt to format many let ... else ...Ian Jackson2023-07-241-2/+6
| | | | | | | | | | | rustfmt has grown opinions about how let ... else ... ought to be formatted. They don't always agree with our previous manual decisions. I think our policy is to always insist on rustfmt. When that version of rustfmt hits stable, our CI will start to fail for everyone. (Right now this discrepancy just causes trouble for contributors who are using nightly by default.)
* Fix typosDimitris Apostolou2023-07-221-9/+9
|
* retry-error: Attempts must be AsRef<dyn Error>; print their sourcesIan Jackson2023-07-191-3/+3
| | | | | | | | The effect is that everywhere a RetryError is used, the error sources for the contained errors will be Display'd. In tor-hsclient we no longer need to explicitly wrap things up in tor_error::Report.
* Merge branch 'clippy-allow' into 'main'Ian Jackson2023-07-111-0/+1
|\ | | | | | | | | clippy: Allow some of our existing code patterns See merge request tpo/core/arti!1396
| * Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
| |
* | Merge branch 'conversation' into 'main'Alexander Færøy2023-07-101-18/+28
|\ \ | | | | | | | | | | | | Overhaul send_control_message See merge request tpo/core/arti!1367
| * | tor-proto: run rustfmtIan Jackson2023-06-301-1/+3
| | |
| * | tor-proto conversation API: Provide ConversationInHandlerIan Jackson2023-06-301-1/+3
| | |
| * | tor-proto conversation API: Return a ConversationIan Jackson2023-06-301-4/+10
| | | | | | | | | | | | | | | This is just a placeholder for now, but it'll be a thing you can send more messages with.
| * | tor-proto conversation API: Rename to start_conversation_last_hopIan Jackson2023-06-301-8/+8
| | | | | | | | | | | | Was send_control_message.
| * | tor-proto conversation API: Make starting message optionalIan Jackson2023-06-301-5/+5
| | | | | | | | | | | | | | | We're going to let people start a conversation and either expect to receive first, or send messages ad-hoc later.
| * | tor-proto conversation API: Rename to ConversationFinishedIan Jackson2023-06-301-2/+2
| | | | | | | | | | | | | | | | | | Was UninstallHandler. We are going to talk more about conversations and less about handlers (although, the fact of there being a handler will still be visible).
* | | Merge branch 'recurse' into 'main'Alexander Færøy2023-07-101-26/+37
|\| | | |/ |/| | | | | tor-hsclient: Mock traits: Work around an async boobytrap See merge request tpo/core/arti!1365
| * tor-hsclient: Mock traits: Work around an async boobytrapIan Jackson2023-06-301-26/+37
| |
* | Add exceptions for some cases of diverging_sub_expressionNick Mathewson2023-07-101-0/+2
| | | | | | | | | | | | | | | | See here for documentation on the lint: https://rust-lang.github.io/rust-clippy/master/index.html#/diverging_sub_expression The issue here, from what I can tell, is that the lint triggers whenever you use a diverging expression as a function body within an
* | Throughout: Use *_report!() macros for reporting Errors.Nick Mathewson2023-07-071-12/+8
|/ | | | | | | | | | | | | | | I identified the cases to replace by searching for the string `.report()`. There are a few that I didn't change: * A couple of cases that used anyhow::Error, * One case that reported two Errors. * Two cases in `tor_hsclient::err` that just did `error!("Bug: {}")`. I have also not audited the cases in `tor-hsclient` where we're using `tor_error::Report` manually. Nonetheless, closes #949.
* Merge branch 'timeouts' into 'main'Ian Jackson2023-06-291-16/+109
|\ | | | | | | | | tor-hsclient: Use estimated timeouts See merge request tpo/core/arti!1342
| * tor-hsclient: Add some notes about timeouts and hopsIan Jackson2023-06-291-0/+8
| |
| * tor-hsclient: Use estimated timeouts for introduction and rendezvous (fmt)Ian Jackson2023-06-291-2/+6
| |
| * tor-hsclient: Use estimated timeouts for introduction and rendezvousIan Jackson2023-06-291-12/+44
| | | | | | | | Replacing RPT_IPT_TIMEOUT is not entirely straightforward.
| * tor-hsclient: Use estimated timeout for hsdir fetches (fmt)Ian Jackson2023-06-291-1/+1
| |
| * tor-hsclient: Use estimated timeout for hsdir fetchesIan Jackson2023-06-291-5/+7
| |
| * tor-hsclient: Provide bodge constant for circuit lengthIan Jackson2023-06-291-0/+11
| |
| * tor-hsclient: Plumb timeout estimation machineryIan Jackson2023-06-291-0/+36
| |
* | Merge branch 'maxintro3' into 'main'Ian Jackson2023-06-291-4/+0
|\ \ | |/ |/| | | | | tor-netdoc: Handle anomalous numbers of introduction points See merge request tpo/core/arti!1332
| * tor-netdoc: Reject hsdescs with no intro pointsIan Jackson2023-06-281-4/+0
| | | | | | | | None of the existing NetdocErrorKinds seemed right.
* | tor-hsclient: Use proper CircParametersIan Jackson2023-06-291-2/+2
| | | | | | | | Fixes #935
* | tor-hsclient: err: Rename to RendezvousCompletionCircuitErrorIan Jackson2023-06-291-1/+1
| | | | | | | | | | | | | | Thsi is a bit of a mouthful now, but it is comprehensible. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1336#note_2917235
* | tor-hsclient: Handle handshake completion error correctlyIan Jackson2023-06-281-6/+10
| |
* | tor-hsclient: Rename RendezvousCompletionCircuit from RendezvousCompletionIan Jackson2023-06-281-1/+1
|/ | | | | | We need to handle errors during the handshake. That also produces a `tor_proto::Error` but we want to print a different message for that, so let's rename this before adding the new variant.