summaryrefslogtreecommitdiff
path: root/crates/tor-proto/src
Commit message (Collapse)AuthorAgeFilesLines
* proto: ClientCirc: remove now-obsolete note on Clone-nessNick Mathewson2023-06-281-5/+0
|
* proto: document ClientCirc lifecycle better.Nick Mathewson2023-06-281-0/+29
|
* proto: document channel lifecycle better.Nick Mathewson2023-06-281-5/+24
|
* Merge branch 'ticket_914' into 'main'Nick Mathewson2023-06-282-118/+9
|\ | | | | | | | | | | | | Remove support for receiving unauthenticated SENDMEs. Closes #914 See merge request tpo/core/arti!1283
| * proto: Remove support for receiving unauthenticated SENDMEsNick Mathewson2023-06-262-118/+9
| | | | | | | | | | | | | | We haven't generated these since Tor 0.3.5, which is no longer supported on the network. Closes #914.
* | Back down x25519-dalek to 2.0.0-pre.1 from 2.0.0-rc.2pinkforest2023-06-273-13/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ========================= Notes from nickm: (This differs from pinkforest's original MR: It removes the Cargo.lock changes and the version bump on tor-llcrypto.) Minimal Cargo.lock changes from downgrade. (These are exactly those changes generated by running "build" and "test".) There are several reasons to do this: * It's best to bump all of our dalek dependencies at once to rc.3 or later, rather than the piecemeal approach we've been stuck with so far. * We don't want to do this bump right now, since there are some tricky questions about clamping we need to figure out (see #808), and we need to make sure we get them right, and we're in a distracted this week. * We _do_ need to move away from 2.0.0-rc.2 right now, since it was causing a failure in `cargo install arti`, and then it got yanked. Thanks to pinkforest for helping us out here and explaining all of this! Fixes #926. Commit-edited-by: Nick Mathewson <[email protected]>
* Merge branch 'proto-better-path' into 'main'Nick Mathewson2023-06-223-62/+177
|\ | | | | | | | | | | | | Better API for getting circuit paths Closes #787 See merge request tpo/core/arti!1286
| * proto: Resolve/downgrade some path-related "TODO HS" itemsNick Mathewson2023-06-222-4/+6
| |
| * proto: Implement Redactable and Display for PathEntry.Nick Mathewson2023-06-221-0/+23
| |
| * proto: Add ClientCirc::path_ref(), deprecate path().Nick Mathewson2023-06-221-13/+35
| | | | | | | | | | | | | | | | The new path_ref() method returns an Arc<Path>, which gives a much better API for reasons discussed in the new documentation of path(). (We could just replace path() if we'd prefer, but IMO having path_ref() here isn't so bad.)
| * proto: Make Path and PathEntry at least minimally usefulNick Mathewson2023-06-221-0/+28
| | | | | | | | | | (I'm not 100% sure about having both hops() and iter(). Should I remove one?)
| * proto: Expose an opaque PathEntry.Nick Mathewson2023-06-223-20/+29
| | | | | | | | | | | | The new PathEntry struct wraps the old PathEntry enum, which has been renamed to HopDetail. It's an opaque struct because we want to be able to put new information in the enum as we think best.
| * proto: Make Path publicNick Mathewson2023-06-222-4/+9
| | | | | | | | (You can't get one yet or do much with it.)
| * proto: Remove Mutex from Path.Nick Mathewson2023-06-223-17/+13
| | | | | | | | | | Now Path is a regular struct with no interior mutability, and we use Arc::make_mut() for the case when we need to add a hop.
| * proto: Move Path into a separate shared mutable structureNick Mathewson2023-06-222-14/+44
| | | | | | | | (We're about to remove the interior mutability from Path.)
* | proto: Downgrade a comment about unauthenticated SENDMEsNick Mathewson2023-06-211-5/+9
| | | | | | | | We never actually need to allow these again; see #914
* | proto::circuit::handshake: downgrade a "TODO HS".Nick Mathewson2023-06-211-2/+2
| |
* | proto: Put client and service hs_ntor behind individual featuresNick Mathewson2023-06-211-5/+17
| | | | | | | | | | This lets us keep the service-side hs-ntor handshake experiemental for now.
* | proto: Resolve some hs_ntor "TODO HS" comments.Nick Mathewson2023-06-211-10/+7
| |
* | proto: downgrade some "TODO HS" comments to "HSS"Nick Mathewson2023-06-212-8/+8
|/ | | | | These are all related to issues that will come up for the service side of the onion service implementation.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* Lower tor-proto::util::ct::lookup to tor-llcryptoNick Mathewson2023-06-163-59/+5
| | | | | | | | This is mostly code movement; you may want to review it with `--color-moved`. I'm doing this so we can also use the function in netdoc for looking up hsdesc authentication.
* proto: Make sure that auth tags are truncated to 20 bytesNick Mathewson2023-06-131-3/+13
| | | | | | | | Onion service hops (pointlessly) use SHA3-256 for their authentication, but they truncate it to 20 bytes (assuming I'm reading the C right.) See torspec#204 for clarification here.
* proto: Convert MsgHandler API to expect a message, not a cell.Nick Mathewson2023-06-122-7/+16
| | | | Closes #887.
* proto: Add a commment about a problem in my hs_ntor plans.Nick Mathewson2023-06-121-0/+4
| | | | | I am pretty sure that C tor works around this somehow; we should figure out how!
* proto: code movement and reindentation in hs_ntorNick Mathewson2023-06-121-86/+75
|
* proto: Remove now-unused hs_ntor APIsNick Mathewson2023-06-121-43/+21
|
* proto: refactor hs_ntor to reuse state.Nick Mathewson2023-06-121-14/+49
| | | | | | | | | | We want the ability to send the same handshake request in parallel on multiple introduce circuits. This implies encoding the client handshake more than once. (Sadly we can't _actually_ do this in the protocol as it stands, since the onion service can use a separate KP_hss_ntor for each introduction point; I'll add a comment to that effect later.)
* Apply 1 suggestion(s) to 1 file(s)Ian Jackson2023-06-121-1/+1
|
* proto: Have send_control_message take an AnyRelayMsg.Nick Mathewson2023-06-091-4/+2
| | | | | | | | | | When we break the 1:1 relationship of message and cell, we'll want this API to take messages, not cells. This API is experimental, so we don't need to call it a semver break. Closes #881.
* proto: Correct the docs on send_control_messageNick Mathewson2023-06-091-2/+7
| | | | | | | | Formerly we said that it would not return until the handler was uninstalled. This is incorrect: it returns as soon as the message is sent and the handler installed. Closes #885.
* Fix a silly clippy warningIan Jackson2023-06-081-0/+1
| | | | | Fixes nailing-cargo +stable clippy -p tor-hsclient --all-features --all-targets
* Merge branch 'remove_arrayref' into 'main'Nick Mathewson2023-06-062-4/+10
|\ | | | | | | | | | | | | Remove use of arrayref Closes #872 See merge request tpo/core/arti!1214
| * tor-proto: Remove use of arrayref.Nick Mathewson2023-06-012-4/+10
| |
* | tor-circmgr: send_control_message: Add reference to MR discussionIan Jackson2023-06-051-0/+2
| |
* | tor-circmgr: send_control_message: Change a rename proposalIan Jackson2023-06-051-1/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1218#note_2908119
* | tor-circmgr: send_control_message: Fix reference to circuitIan Jackson2023-06-051-1/+1
| |
* | tor-circmgr: send_control_message: API change proposalIan Jackson2023-06-051-0/+21
| | | | | | | | | | | | I am hoping we can merge this as a "TODO (Diziet)", even though I think it may be controversial. Ie merging this doesn't represent a decision to do as I suggest.
* | tor-circmgr: Propose to rename `MetaCellDisposition::UninstallHandler`Ian Jackson2023-06-051-0/+4
| |
* | tor-circmgr: send_control_message: Clarify some corner casesIan Jackson2023-06-052-7/+34
|/ | | | | | | | | | | | Also, no longer talk about handlers being "installed". That's not something that's exposed by this API. And, say that `send_control_message` can be called again only after *`send_control_message`* returns, not when `handle_msg` has returned `UinstallHandler`. IMO this makes more sense. Explain that we can't maintain a continuous watch while holding a conversation with the peer. (This is surely an API bug.)
* Merge branch 'stream_ctrl' into 'main'Nick Mathewson2023-05-243-1/+234
|\ | | | | | | | | | | | | Experimental new stream-ctrl feature Closes #847 See merge request tpo/core/arti!1198
| * Add "TODO RPC" notes around DataStreamCtrl per review.Nick Mathewson2023-05-242-0/+16
| |
| * proto: Add stream-status functionality to DataStreamCtrl.Nick Mathewson2023-05-241-2/+106
| | | | | | | | There are some weaknesses and problems here; see TODO notes.
| * proto: Create a `DataStreamCtrl` type.Nick Mathewson2023-05-223-1/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is that we want to make DataStream visible to the RPC system without requiring that the RPC session hold the DataStream itself (or the Reader, or the Writer). We could solve this problem by making _all_ the state in the DataStream shared, but that would introduce unnecessary extra locking in our critical path. Instead we're creating the notion of a "control handle" that lets you manage and observe a stream without actually owning the stream. Right now the only supported functionality is asking for the stream's circuit. Part of #847
* | proto: Make PathEntry::Virtual feature-conditional.Nick Mathewson2023-05-232-0/+3
|/ | | | | This fixes a warning when building tor-proto without the `rpc-common` feature.
* Merge branch 'virtual_hop' into 'main'Nick Mathewson2023-05-185-38/+245
|\ | | | | | | | | | | | | tor-proto: Add support for extending circuits through virtual hops. Closes #726 See merge request tpo/core/arti!1191
| * proto: Explain "virtual" hops better.Nick Mathewson2023-05-181-0/+4
| | | | | | | | Based on text from @diziet
| * proto: Try to improve the documentation in crypto/cell.rsNick Mathewson2023-05-181-24/+86
| |
| * proto: Allow circuit Paths to represent virtual hops.Nick Mathewson2023-05-183-14/+57
| | | | | | | | | | Sadly, this adds a few more `TODO HS` entries, but I think we can clean them up later after a bit of discussion.
| * proto: Implement Circuit::extend_virtual.Nick Mathewson2023-05-182-2/+59
| | | | | | | | | | | | | | There are a few new TODO hs comments, though, and an XXXX I'll need to fix up in the next commit. Implements #726.