aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpc-client-core/src/conn/stream.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-3/+3
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* rpclib: Obey error Display convention wrt sources.Nick Mathewson2025-02-041-3/+3
| | | | | | | In general, we try to obey the convention that an error's Display method does not display that error's sources. Part of #1650.
* rpclib: Avoid overuse of execute_internal_ok.Nick Mathewson2025-01-231-11/+25
| | | | | | | | | | | The execute_internal_ok method converts every error response into an internal error; as such, it's only appropriate when there is no way for a well-behaved Arti instance to give an error response. But we had been using it in a few places where errors were possible under other circumstances. This commit fixes that behavior, and adds documentation to help avoid it.
* rpclib: Rename params/reply structs for consistency.Nick Mathewson2025-01-211-18/+15
| | | | | | | | Our now convention here in rpclib is that a struct holding a request's parameters is called `FooParams`, and a struct holding that request's reply is called `FooReply`. Closes #1586
* Merge branch 'rpc-clean-up-after-auth' into 'main'Nick Mathewson2025-01-151-10/+2
|\ | | | | | | | | rpclib: Clean up after performing cookie auth See merge request tpo/core/arti!2716
| * rpclib: Clean up after performing cookie authNick Mathewson2025-01-151-10/+2
| | | | | | | | | | | | Previously we never released the intermediary cookie-auth object, which would have left it kicking around on the RPC server side until we finally closed our connection.
* | rpc: Rename new_stream_handle to new_oneshot_client.Nick Mathewson2025-01-151-2/+5
|/ | | | | | | | This method doesn't actually create a new stream; it creates a single-use client object that can be used with SOCKS to launch a new stream, and capture an RPC object for that stream. Closes #1664.
* rpc: Move "rpc:release" to be a method on the rpc object.Nick Mathewson2024-10-231-9/+1
| | | | | | | Now, instead of telling the session or the connection to drop the object ID, we tell the object ID to go away. Closes #1663.
* Replace _ => panic!() elsewhereIan Jackson2024-10-151-1/+1
|
* Replace references to prop351 with socks-extensions.mdNick Mathewson2024-10-021-1/+2
| | | | | | | Now that the proposal is implemented and merged into the specs, the proposal itself is only historical. Closes #1629.
* Merge branch 'rpc_unexpected_reply' into 'main'Nick Mathewson2024-10-021-10/+8
|\ | | | | | | | | | | | | rpclib: Unify code for internally generated requests Closes #1587 See merge request tpo/core/arti!2456
| * rpclib: Unify code internally generated requestsNick Mathewson2024-09-251-10/+8
| | | | | | | | | | | | | | | | 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.
* | tor-socksproto: Handle 0-byte reads (EOF) correctlyIan Jackson2024-10-011-1/+1
| | | | | | | | | | | | | | This restores the functionality of socks users: detect closed sockets. 0c595818f713916d94b7b0e4062f953fad7c9799 which we reverted as part of rebasing this branch onto main.
* | 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-011-33/+16
| |
* | Apply deferred rustfmt churnIan Jackson2024-10-011-3/+2
| |
* | tor-socksproto: Move `handshake` to be a trait methodIan Jackson2024-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Revert "socks users: detect closed sockets."Ian Jackson2024-10-011-10/+1
| | | | | | | | This reverts commit 0c595818f713916d94b7b0e4062f953fad7c9799.
* | Revert "rpclib: read SOCKS _after_ processing."Ian Jackson2024-10-011-12/+12
| | | | | | | | This reverts commit 8da8b88481c26d49ac96e79165538e01237ec9ed.
* | rpclib: read SOCKS _after_ processing.Nick Mathewson2024-09-251-12/+12
| | | | | | | | | | | | | | | | When doing the client handshake, we need to read data _after_ we check for stuff to send, since the client speaks first in the socks protocol. Without this patch, the socks handshake just stalls.
* | Merge branch 'socks_read_zero' into 'main'Nick Mathewson2024-09-251-1/+10
|\ \ | | | | | | | | | | | | | | | | | | socks users: detect closed sockets. (TROVE-2024-011) Closes #1635 See merge request tpo/core/arti!2447
| * | socks users: detect closed sockets.Nick Mathewson2024-09-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without this check, our socks code can enter an infinite loop if a socket is closed at the wrong time. Resolves TROVE-2024-011. Fixes #1635.
* | | Merge branch 'rename_singleton_id' into 'main'Jim Newsome2024-09-251-2/+2
|\ \ \ | |/ / |/| / | |/ | | | | | | rpc: Rename SingletonId to SingleIdResponse Closes #1585 See merge request tpo/core/arti!2448
| * rpc: Rename SingletonId to SingleIdResponseNick Mathewson2024-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | Calling it "singleton" might have suggested that it was using the [singleton pattern](https://en.wikipedia.org/wiki/Singleton_pattern), which it isn't. (Renaming done with rust-analyzer and double-checked with `git grep`.) Closes #1585.
* | rpclib: Use prop351 protocol to open streams.Nick Mathewson2024-09-181-9/+9
|/ | | | | | | | | | | Now that prop351 is what Arti speaks, it's what the rpclib needs to provide. Note one change in particular: the `isolation` string is no longer an optional argument when opening a stream. (With prop351, there is no longer such a thing as an "absent" isolation string, and we don't want to imply that there is a difference between None and "".)
* rpclib: Remove TODO about connect=>stream renaming.Nick Mathewson2024-09-101-4/+0
| | | | | AFIACT, all of this renaming is done. I've grepped for `[Cc]onn` and didn't find any more identifiers that needed to be renamed.
* rpclib: Rename "connect" to "open_stream" as appropriate.Nick Mathewson2024-09-101-4/+4
|
* rpclib: Rename connect.rs to stream.rsNick Mathewson2024-09-101-0/+391
(This is about DataStreams, so we should make it less confusing. This commit is _just_ about the file renaming, with no associated function renaming.)