summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* Add Reactor::create_firsthop_ntor_v3Jim Newsome2023-11-271-0/+50
|
* NtorV3PublicKey: make fields pub(crate), as for NtorPublicKeyJim Newsome2023-11-271-2/+2
|
* Use HandshakeType in Extend2 and CircuitExtender::beginJim Newsome2023-11-271-2/+2
|
* Merge remote-tracking branch 'public/hs_begin'Nick Mathewson2023-11-161-0/+1
|\
| * hsrproxy: Send back DONE reasons.Nick Mathewson2023-10-231-0/+1
| | | | | | | | | | This is in keeping with the behavior of C tor, and of torspec!179.
* | Merge branch 'strip_onion_begin' into 'main'Alexander Færøy2023-11-153-1/+40
|\ \ | | | | | | | | | | | | | | | | | | Send less information in onion service BEGIN messages Closes #1077 See merge request tpo/core/arti!1738
| * | Send less information in onion service BEGIN messagesNick Mathewson2023-11-153-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | While looking for differences, we found that C tor always omits the flags and the hostname from a BEGIN message sent on an onion service circuit. In torspec!179, we specified that behavior. This patch brings arti into conformance. Closes #1077.
* | | Merge branch 'upgrades-20231115' into 'main'gabi-2502023-11-151-1/+1
|\ \ \ | |/ / |/| | | | | | | | Upgrade a couple of dependencies See merge request tpo/core/arti!1736
| * | Upgrade to itertools 0.12.0Nick Mathewson2023-11-151-1/+1
| | |
* | | tor-proto: make ClientHandShake and ServerHandshake generic over aux dataJim Newsome2023-11-156-164/+112
| | |
* | | Add NtorV3Server and implement ServerHandshake for itJim Newsome2023-11-151-29/+43
| | |
* | | ServerHandshake: extend to support ntorv3 extensionsJim Newsome2023-11-154-20/+130
| | |
* | | NtorV3Client: implement ClientHandshakeJim Newsome2023-11-151-7/+13
| | |
* | | ClientHandshake: extend to support ntorv3 extensionsJim Newsome2023-11-154-22/+66
| | |
* | | NtorV3Client: take a slice instead of a vec of extensionsJim Newsome2023-11-151-5/+3
| | |
* | | ntor_v3: replace `impl digest::XofReader` with `NtorV3XofReader`Jim Newsome2023-11-151-15/+20
| | |
* | | CircuitHandshake::Ntor::ed_identity clarify doc-commentJim Newsome2023-11-151-2/+2
| | | | | | | | | | | | | | | Use consistent phrasing when describing the two key fields to make it clear they're referring to the same relay.
* | | hs_ntor: fix comment typo INTROUDCE1Jim Newsome2023-11-151-1/+1
|/ /
* | circuit: On SendMsgAndInstallHandler, tolerate None handlerNick Mathewson2023-11-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Previously it was possible for `handler` to be None only when `msg` was also None, which would make SendMsgAndInstallHandler into a no-op. Now, if `msg` is present but `handler` is absent, we use the previously installed handler, which I think was our intention. Without this patch, `Conversation::send_message` simply won't work. Fixes #1085.
* | circuit::reactor: Remember that meta_handler is Send.Nick Mathewson2023-11-021-2/+2
| | | | | | | | | | | | (We already require that it is Send when the client gives it to us in circuit.rs, but we had previously forgotten that when we stored it in the Reactor.)
* | Remove semver.md files from arti 1.1.10Nick Mathewson2023-10-311-3/+0
| |
* | Merge branch 'semver-bumps' into 'main'Nick Mathewson2023-10-311-8/+8
|\ \ | | | | | | | | | | | | Update versions for today's releases. See merge request tpo/core/arti!1716
| * | Patch version bumps in crates without breaking changesNick Mathewson2023-10-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` These crates have new APIs: tor-async-utils ADDED tor-config ADDED tor-hscrypto ADDED tor-netdoc ADDED, plus BREAKING-experimental. These crates have patch-level changes only: tor-netdir (bugfix only). (re-exposes netdoc) arti-rpcserver (tweaks only, uses nothing that broke.) arti 1.1.10, no stable public APIs. ```
| * | Minor version bumps in crates with breaking changes.Nick Mathewson2023-10-311-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` tor-basic-utils BREAKING tor-rtmock BREAKING. tor-cert BREAKING tor-cell BREAKING tor-proto BREAKING: re-exposes cell. (Also BREAKING-experimental) tor-chanmgr BREAKING: Re-exposes proto. tor-ptmgr BREAKING: re-exposes tor-chanmgr tor-guardmgr BREAKING: re-exposes proto. (Only for ClockSkew I think?) tor-circmgr BREAKING: re-exposes proto tor-dirclient BREAKING tor-hsclient BREAKING, re-exposes proto. tor-hsservice BREAKING, re-exposes proto. tor-hsrproxy BREAKING arti-client BREAKING: re-exposes proto. arti-hyper: BREAKING, re-exposes arti-client. tor-dirmgr Let's assume BREAKING, very high-level. tor-keymgr BREAKING, but experimental. ```
* | | Precisely cfg-decorate a constantIan Jackson2023-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Peraonally I would prefer | #![cfg_attr(not(all(feature = "full", feature = "experimental")), | allow(dead_code))] but I think that is almost certainly controversial. See tpo/core/arti#704.
* | | Add cfg_attr allow(unused_imports) to two cratesIan Jackson2023-10-311-0/+6
|/ / | | | | | | | | As per this comment, and preceding discussion https://gitlab.torproject.org/tpo/core/arti/-/issues/1060#note_2959187
* | Add a caret_int HandshakeType for HTYPE constantsJim Newsome2023-10-263-4/+9
| |
* | Change `CircId` to never be zeroJim Newsome2023-10-256-59/+94
| | | | | | | | | | | | | | | | | | | | This changes the internal representation to be `NonZeroU32` instead of just `u32`. Various places where a circuit ID is optional now use `Option<CircId>`. Fixes a bug in `CircIdRange::sample` that would previously return a circuit ID of 0, when the rng returned 0x8000_0000 for a low range.
* | Convert StreamId to NonZeroU16Jim Newsome2023-10-257-73/+82
|/
* Fix rustdoc link warnings/errors.Nick Mathewson2023-10-201-1/+1
|
* Merge branch 'tricky_terminate' into 'main'Nick Mathewson2023-10-195-181/+151
|\ | | | | | | | | | | | | Refactor the stream-closing logic in tor-proto Closes #1065 See merge request tpo/core/arti!1681
| * proto: Revise the behavior of IncomingStream::discard().Nick Mathewson2023-10-194-22/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | Because dropping a `StreamTarget` causes the circuit reactor to send an End, the previous do-nothing implementation of `discard()` wasn't sufficient to cause the request to be ignored without sending an End. This commit modifies our "close pending stream" behavior to only optionally send an End message. To avoid confusion, I'm using a new `CloseStreamBehavior` enum rather than an `Option<End>`, since we had previously used `None` in some cases to indicate a default (misc) end message.
| * IncomingStream:: flatten IncomingStreamInner.Nick Mathewson2023-10-191-13/+11
| |
| * IncomingStream: Remove state.Nick Mathewson2023-10-192-67/+5
| | | | | | | | | | | | Now that every state-change function consumes the IncomingStream, there is no longer any reason to keep track of an internal state enum.
| * Note a bug in IncomingStream::discard.Nick Mathewson2023-10-191-0/+2
| |
| * Remove IncomingStreamInner from its Option.Nick Mathewson2023-10-191-34/+7
| | | | | | | | | | Now that IncomingStream doesn't implement Drop, we can just destructure it.
| * Remove impl Drop from IncomingStreamNick Mathewson2023-10-191-11/+4
| | | | | | | | | | Since dropping a StreamTarget will send an End, we don't need to call reject_internal in this case.
| * proto: Remove TODOs about panics on double-close.Nick Mathewson2023-10-192-31/+2
| | | | | | | | | | | | | | Now that `StreamMap::terminate` no longer panics, and now that it permits the kind of double-call that we allow, we can close #1065. Closes #1065.
| * proto: Have EndSent remember if we have dropped the stream target.Nick Mathewson2023-10-192-14/+46
| | | | | | | | | | The rule is that we allow up to one explicit `close_pending`, followed by exactly one final `mpsc::Sender` drop.
| * proto: Give StreamMap::terminate a "why" argumentNick Mathewson2023-10-192-7/+45
| | | | | | | | | | We will use this to enforce correct ordering on "close" vs "drop" APIs.
* | Merge branch 'upgrade_20231017' into 'main'Ian Jackson2023-10-192-3/+3
|\ \ | |/ |/| | | | | Upgrade several dependencies. See merge request tpo/core/arti!1680
| * Upgrade to latest asynchronous_codec (0.7.0)Nick Mathewson2023-10-172-3/+3
| |
* | Add comments about another problem with close_pending().Nick Mathewson2023-10-172-0/+21
| | | | | | | | See #1065 for more information here.
* | proto: Make StreamTarget::close() misuse less likely.Nick Mathewson2023-10-172-5/+9
|/ | | | | | | | | It turns out that we can make `IncomingStream::reject()` consume self, thus making it impossible to hit the double-close error from outside the `tor-proto` crate. Also, we rename `StreamTarget::close()` to `close_pending()` to better reflect its limited applicability.
* Merge branch 'todos_proto' into 'main'Nick Mathewson2023-10-125-91/+122
|\ | | | | | | | | tor-proto: Resolve a few TODO HSS entries. See merge request tpo/core/arti!1658
| * proto::stream::incoming: Use bit-array representation for command listNick Mathewson2023-10-122-7/+85
| | | | | | | | | | This should be smaller and faster than vec, and save some allocations. It could also avoid a tiny sidechannel.
| * tor-proto: remove a now-unneeded allow in stream::incomingNick Mathewson2023-10-121-2/+0
| |
| * Remove the (fairly bogus) HsNtorServiceInput type.Nick Mathewson2023-10-122-80/+38
| | | | | | | | This will let avoid some copying inside our HSS code.
| * proto: Remove a TODO about merging two functions.Nick Mathewson2023-10-121-2/+0
| | | | | | | | | | There is some similarity, but there's not really a logical way to combine the two that actually results in less, clearer code.
| * Lower and downgrade a TODO about StreamID and NonZeroU16.Nick Mathewson2023-10-121-1/+0
| |