summaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* rpc: Give the session-creation function an argument.Nick Mathewson2023-06-151-1/+1
| | | | | | This will later let us tell the session-creation function how the authentication occurred, which will let it decide what privileges to provide.
* rpc: Rename Session=>RpcSessionNick Mathewson2023-06-151-1/+1
|
* rpc: Expose Session object.Nick Mathewson2023-06-151-0/+1
| | | | | We'll want to move the responsibility for creating Sessions outside the rpcmgr crate.
* RPC: Implement a "global identifier" for non-session-bound IDsNick Mathewson2023-06-051-0/+1
| | | | | | | These identifiers are actually only "global" with respect to a given `RpcMgr`, but they should not be forgeable or reusable across RpcMgr objects. We're going to use them so that we have a kind of identifier for `TorClient`s that we can expose to SOCKS.
* rpc: Make the top-level returned object a "session".Nick Mathewson2023-05-241-0/+1
| | | | | | This will make it easier to change the semantics of what exactly we return, whether it has to be/contain a client, whether you can use it to look up all the live objects, &etc.
* RPC: Rename session.rs to connection.rsNick Mathewson2023-05-041-2/+2
|
* RPC: rename Session to Connection.Nick Mathewson2023-05-041-1/+1
| | | | | | | To me, "Session" suggests that we're authenticated, when we are not necessarily authenticated. Also, we may eventually want to have some kind of persistent session object; if we do, then we'll want Connections to be separate.
* Add a generational arena for object mapping for RPC.Nick Mathewson2023-05-041-0/+1
| | | | | | See the comments on `TypedAddr` for some explanations about why this is so tricky. Thanks to @diziet for helping me figure this out.
* RPC: Move the "listen" part of the RPC listener code to `arti`.Nick Mathewson2023-05-041-3/+1
| | | | | | | | | Now there's a module in `arti` that runs the loop for an RPC listener. The part of the old `listener` module that made the framed connections is now part of the `Session` object. There is now yet another a temporary location for the pipe; we should pick something better. At least now it's configurable.
* rpc: Make an RpcMgr type to own the DispatchTable.Nick Mathewson2023-05-041-0/+3
| | | | | | | | | In the future, this will probably hold more data as well, like a TorClient and some configuration info. The TorClient will present an issue; I've made comments about that. Closes #820
* rpc: Improve error reporting for invalid requestsNick Mathewson2023-04-121-0/+1
| | | | | | | | | | | | | | | | This is a bit big, but it's not that _complicated_. The idea here is that we use serde's "untagged" enum facility when parsing our `Request`s, such that if parsing as a `Request` fails, we parse as an `InvalidRequest` and try to report what the problem was exactly. This lets us determine the ID of a request (if it had one), so we can report that ID in our error message. We can also recover from a much broader variety of errors. We now also conform with the spec reporting errors about completely wrong json, requests without IDs, and so on.
* rpc: Add standard warnings to arti-rpcserverNick Mathewson2023-04-121-3/+35
|
* RPC: add a temporary "listen" function.Nick Mathewson2023-04-121-0/+3
| | | | | It requires tokio, it's unix-only, and makes some unfortunate shortcuts. Probably good enough for initial testing.
* rpc: Add a Session object and an interaction loop.Nick Mathewson2023-04-121-0/+1
|
* rpc: Add asynchronous_codec wrapper for jsonlines.Nick Mathewson2023-04-121-0/+1
|
* rpc: Add a cancellable future type.Nick Mathewson2023-04-121-0/+1
| | | | | | Ordinarily you can cancel a future just by dropping it, but we'll want the ability to cancel futures that we no longer own (because we gave them to a `FuturesUnordered`).
* rpc: Implement json message types for serde.Nick Mathewson2023-04-121-0/+8