summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | rpclib: Unify code internally generated requestsNick Mathewson2024-09-254-45/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have a single type to represent the error "A request that we made internally didn't get a result we expected." The functions to generate these requests are now centralized too. Closes #1587.
| * | | | | rpclib: Implement Display for Utf8CString.Nick Mathewson2024-09-251-0/+7
| | | | | |
| * | | | | rpc: Finish an incomplete sentence in a doc.Nick Mathewson2024-09-251-1/+1
| | | | | |
* | | | | | Merge branch 'rpc-doc-socks-objectid' into 'main'Nick Mathewson2024-10-021-0/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy section on objectid/isolation restrictions from prop351. See merge request tpo/core/arti!2474
| * | | | | | Copy section on objectid/isolation restrictions from prop351.Nick Mathewson2024-09-301-0/+16
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Eventually it belongs in an RPC spec, but for now the relevant discussion goes here.
* | | | | | Merge branch 'coarse' into 'main'Nick Mathewson2024-10-022-11/+21
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | tor-proto: Add a CoarseTimeProvider bound to all the SleepProviders See merge request tpo/core/arti!2482
| * | | | | tor-proto: Add a CoarseTimeProvider bound to all the SleepProviders (fmt)Ian Jackson2024-10-011-4/+14
| | | | | |
| * | | | | tor-proto: Add a CoarseTimeProvider bound to all the SleepProvidersIan Jackson2024-10-012-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The memquota arranagements are going to use this. We *don't* apply this to Channel (or to other types that aren't already generic over SleepProvider).
* | | | | | Merge branch 'socksproto-3' into 'main'Ian Jackson2024-10-0116-387/+1033
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | New tor-socksproto API Closes #1627 See merge request tpo/core/arti!2436
| * | | | | tor-socksproto: Handle 0-byte reads (EOF) correctly (fmt)Ian Jackson2024-10-011-1/+3
| | | | | |
| * | | | | tor-socksproto: Handle 0-byte reads (EOF) correctlyIan Jackson2024-10-016-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores the functionality of socks users: detect closed sockets. 0c595818f713916d94b7b0e4062f953fad7c9799 which we reverted as part of rebasing this branch onto main.
| * | | | | fixup! tor-socksproto: Fix doc comment for new_preciseIan Jackson2024-10-011-6/+3
| | | | | |
| * | | | | tor-socksproto: Fix doc comment for ReadPrecisionIan Jackson2024-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2436#note_3081884
| * | | | | tor-socksproto: Fix doc comment for new_preciseIan Jackson2024-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2436#note_3081885
| * | | | | tor-socksproto: Code motion to tidy upIan Jackson2024-10-012-31/+25
| | | | | |
| * | | | | tor-socksproto: Deprecate old APIIan Jackson2024-10-014-6/+13
| | | | | |
| * | | | | tor-socksproto: Introduce handshake_for_tests method (fmt)Ian Jackson2024-10-013-5/+20
| | | | | |
| * | | | | tor-socksproto: Introduce handshake_for_tests methodIan Jackson2024-10-014-36/+44
| | | | | |
| * | | | | tor-chanmgr: Use new tor-socksproto API (fmt)Ian Jackson2024-10-011-2/+1
| | | | | |
| * | | | | tor-chanmgr: Use new tor-socksproto APIIan Jackson2024-10-011-56/+16
| | | | | |
| * | | | | arti-rpc-client-core: Use new tor-socksproto API (fmt)Ian Jackson2024-10-011-2/+1
| | | | | |
| * | | | | arti-rpc-client-core: Use new tor-socksproto APIIan Jackson2024-10-012-33/+17
| | | | | |
| * | | | | arti SOCKS proxy: Defer splitting the socks streamIan Jackson2024-10-011-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | This is neater, I think.
| * | | | | arti SOCKS proxy: Reject pipelined client dataIan Jackson2024-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #1627 / TROVE-2024-010
| * | | | | tor-socksproto: Introduce into_output_forbid_pipeliningIan Jackson2024-10-012-0/+26
| | | | | |
| * | | | | arti SOCKS proxy: Use new tor-socksproto APIIan Jackson2024-10-011-40/+17
| | | | | | | | | | | | | | | | | | | | | | | | No functional change.
| * | | | | tor-socksproto tests: Run test cases via new API in various modesIan Jackson2024-10-011-4/+117
| | | | | |
| * | | | | tor-socksproto tests: Use crate::* rather than ad-hoc importsIan Jackson2024-10-011-7/+1
| | | | | |
| * | | | | tor-socksproto: Introduce new API (fmt)Ian Jackson2024-10-012-3/+4
| | | | | |
| * | | | | tor-socksproto: Introduce new APIIan Jackson2024-10-015-4/+444
| | | | | |
| * | | | | tor-socksproto: Add HasHandshakeOutputIan Jackson2024-10-013-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | Our new API implementation will need this.
| * | | | | Apply deferred rustfmt churnIan Jackson2024-10-016-30/+21
| | | | | |
| * | | | | tor-socksproto: Introduce HandshakeImpl::call_handshake_implIan Jackson2024-10-011-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | This will support both the new and old API.
| * | | | | tor-socksproto: Make NextStepImpl an enum (tidy)Ian Jackson2024-10-012-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant {} from construction of NextStepImpl::Finished. (We kept these in the previous commit to reduce the size of the diff there.)
| * | | | | tor-socksproto: Make NextStepImpl an enumIan Jackson2024-10-013-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We never say both "finished" and "reply". Make this explicit. Our new caller API is going to depend on this. Also, notice if the implementation's behaviour implies an infinite loop, and call that an internal error instead.
| * | | | | tor-socksproto: Introduce NextStepImpl and do drain centrallyIan Jackson2024-10-013-39/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This separates the public API from the internal API, which will allow us to do more work centrally, and defend against various bugs on both sides. The name mirrors a new `NestStep` type we'll introduce as part of a new caller API. For now, we make only one centralisation change: Action.drain is now computed centrally rather than ad-hoc in each protocol implementation branch.
| * | | | | tor-socksproto: Move `handshake` to be a trait methodIan Jackson2024-10-019-42/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deduplicates some docs and eliminates the two wrapper functiosn for `run_handshake`, which is now just `handshake`. We're going to make other API breaks too, and this isn't going to be the primary API, so we might as well do this. Proper description of the semver breakage will come at the end when it's all done.
| * | | | | tor-socksproto: Adjust description of `handshake`Ian Jackson2024-10-012-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speak of "peer" rather than being specific. Also, fix a copypaste mistake: `SocksClientHandshake::handshake`'s doc says it's about `SocksProxyHandshake`. Instead just speak of the "handshake".
| * | | | | tor-socksproto: Factor out reader constructionIan Jackson2024-10-013-30/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code flow changes: * We always construct the Reader, even on paths where we didn't previously. That's fine because it's infallible and has no side effects. * In proxy.rs, the quirk with `input[0]` has gone away. We can use the supplied `Reader` and peek the first byte. No overall functional change.
| * | | | | tor-socksproto: Factor out return value handlingIan Jackson2024-10-015-28/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This centralises the handling of return values, and paves the way for further deduplication. (The two return paragraphs were identical.) There's quite a lot of initial API surface to framework.rs. Some of that is going to be hidden, but we're also going to extend this to do more work. No functional change.
| * | | | | tor-socksproto: Use .is_empty() in some testsIan Jackson2024-10-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type inference seems fragile when comparing with empty slices. Here's a ticket I filed where an earlier version of the tor-socksproto API branch triggered this problem: https://github.com/rust-lang/rust/issues/130480 The latest version seems to trigger it too.
| * | | | | safelog: derive Clone and Copy for Sensitive and RedactedIan Jackson2024-10-012-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | educe has bugs that mean it applies a Copy bound to its Clone impl. Anyway, we just want to derive these normally, not do something weird.
| * | | | | tor-bytes: Restore the message for Error::TruncatedIan Jackson2024-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This variant is deprecated but it still ought to have a message so long as it exists.
| * | | | | Revert "socks users: detect closed sockets."Ian Jackson2024-10-014-28/+3
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0c595818f713916d94b7b0e4062f953fad7c9799.
| * | | | | Revert "socks users: copy the correct amount in our drain logic."Ian Jackson2024-10-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dceeb82f7d1154894ab9c7c607d68f8335bb9615.
| * | | | | Revert "arti SOCKS proxy: Tear down connections when client sends optimistic ↵Ian Jackson2024-10-011-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data" This reverts commit 87e0109832559dec41a485b268579d58be0de278.
| * | | | | Revert "rpclib: read SOCKS _after_ processing."Ian Jackson2024-10-011-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8da8b88481c26d49ac96e79165538e01237ec9ed.
* | | | | | tor-memquota: Implement SinkTrySend for mq_queue::SenderIan Jackson2024-10-012-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | Plumbing.
* | | | | | tor-async-utils: Avoid needless nesting of ErasedSinkTrySendErrorIan Jackson2024-10-011-1/+22
| | | | | |
* | | | | | tor-async-utils: Provide tests for ErasedSinkTrySendErrorIan Jackson2024-10-012-0/+68
| | | | | |