aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpc-client-core/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'rpc-connect-clarify' into 'main'Nick Mathewson2025-01-161-11/+41
|\ | | | | | | | | | | | | rpc: Clarify and fix some issues surrounding relative paths. Closes #1748 and #1749 See merge request tpo/core/arti!2712
| * rpc: Ignore non-absolute paths if they are default.Nick Mathewson2025-01-151-11/+41
| |
* | Merge branch 'rpc-clean-up-after-auth' into 'main'Nick Mathewson2025-01-153-12/+18
|\ \ | | | | | | | | | | | | rpclib: Clean up after performing cookie auth See merge request tpo/core/arti!2716
| * | rpclib: Add a note about where cookie auth is documented.Nick Mathewson2025-01-151-0/+1
| | |
| * | rpclib: Clean up after performing cookie authNick Mathewson2025-01-153-12/+17
| | | | | | | | | | | | | | | | | | 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: Refactor Cookie and UnloadedCookie into a single type.Nick Mathewson2025-01-151-8/+1
| |
* | rpc: consolodate naming of "inherent" auth.Nick Mathewson2025-01-151-1/+1
| | | | | | | | | | | | | | | | | | We don't want to call this "unix path" anywhere, since it corresponds to _any_ case where the ability to negotiate a successful connection means that the client is authorized. We also don't want to call it "none": The authentication is inherent to the connection, not nonexistent.
* | rpc: Tweak cookie protocol to bind both nonces.Nick Mathewson2025-01-151-2/+3
| | | | | | | | | | | | | | | | | | | | Previously participants in the cookie protocol only bound the peer nonce in their MACs. With this change, they bind both nonces. This change is _probably_ not necessary for security, but it can't hurt. It follows a general principle that Adam Langley told me a long time ago: you won't regret binding more, but you might regret binding less.
* | arti-rpc-client-core: Client side of cookie authentication.Nick Mathewson2025-01-154-9/+105
|/
* Implement banner for RPC protocol.Nick Mathewson2025-01-094-6/+41
| | | | Closes #1753
* Merge branch 'mod-module-files' into 'main'Nick Mathewson2025-01-071-0/+1
|\ | | | | | | | | clippy: deny `mod_module_files` See merge request tpo/core/arti!2689
| * clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | | | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* | fix: fix typosDimitris Apostolou2025-01-061-1/+1
|/
* rpc-client: Reject relative paths.Nick Mathewson2024-12-093-1/+11
|
* rpc-client: split paths better on windows.Nick Mathewson2024-12-091-1/+12
|
* rpc-client: Add TODOs about links to connect point docsNick Mathewson2024-12-091-0/+6
|
* rpc-client: Rename PathEntry to SearchEntry.Nick Mathewson2024-12-091-18/+18
|
* rpc-client: Clarity and consistency in envvar docsNick Mathewson2024-12-091-10/+20
|
* artilib: Revise C and Python APIs for builders.Nick Mathewson2024-12-093-20/+128
| | | | | | | | | | | | | | | Expose ArtiRpcConnBuilder and appropriate C wrapper functions in our FFI code, and wrap those functions in our python wrapper. This breaks the old C API, but that's allowed since the API is still experimental. Some design decisions: * I've wrapped the builder in a Mutex, so that we can continue our FFI rule that we do not require non-Rust code to wrap `&mut`. * I've removed the non-builder connect() function from the C API as extraneous. * I've made a single function to prepend elements to the search path.
* rpc-client-core: Correct various FFI error types.Nick Mathewson2024-12-091-6/+42
|
* rpc-client: Initial implementation for RPC connect points.Nick Mathewson2024-12-094-70/+311
| | | | | | | | | This commit covers the major points of the design: Parsing the environment, parsing and resolving connect points, connecting to Arti, and handling errors. There are a few areas that need to be fixed, all marked with XXXXs.
* rpc-client: move Builder to its own module.Nick Mathewson2024-12-092-85/+95
|
* Resolve clippy::empty_line_after_doc_comments warnings.Nick Mathewson2024-12-031-1/+1
| | | | These are new in Rust 1.83.
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* rpc: correct msg and doc for InvalidInput::NullPointerNick Mathewson2024-10-231-2/+2
| | | | | Previously we implied that it was only for strings, which isn't the case.
* 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.
* rpclib: Rename RequestCancelled to be accurate.Nick Mathewson2024-10-213-14/+8
|
* Replace _ => panic!() elsewhereIan Jackson2024-10-151-1/+1
|
* arti-rpc-client-core: remove 'c_str_macro' dependencySteven Engler2024-10-091-16/+15
| | | | | Arti has a MSRV of rust 1.77 which supports C string literals, so 'c_str_macro' isn't needed.
* Merge branch 'prop351-refs' into 'main'Jim Newsome2024-10-031-1/+2
|\ | | | | | | | | | | | | Replace references to prop351 with socks-extensions.md Closes #1629 See merge request tpo/core/arti!2492
| * 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 'ffi_seal' into 'main'Nick Mathewson2024-10-021-34/+41
|\ \ | |/ |/| | | | | artilib: Take a different approach to sealing a pair of traits. See merge request tpo/core/arti!2472
| * artilib: Take a different approach to sealing a pair of traits.Nick Mathewson2024-10-011-34/+41
| | | | | | | | This resolves a "TODO MSRV" comment.
* | Merge branch 'rpc_unexpected_reply' into 'main'Nick Mathewson2024-10-025-46/+120
|\ \ | | | | | | | | | | | | | | | | | | rpclib: Unify code for internally generated requests Closes #1587 See merge request tpo/core/arti!2456
| * | rpclib: Add a #[source] annotation.Nick Mathewson2024-10-021-1/+1
| | |
| * | Apply 1 suggestion(s) to 1 file(s)Nick Mathewson2024-10-021-1/+1
| | | | | | | | | Co-authored-by: gabi-250 <[email protected]>
| * | 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
| | |
* | | 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-012-11/+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-252-1/+11
|\ \ | | | | | | | | | | | | | | | | | | 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-242-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.