aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/mgr.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove explicit allows for missing_panics_docs.Nick Mathewson2023-07-061-1/+0
| | | | These are no longer needed.
* Merge branch 'rpcdoc' into 'main'Ian Jackson2023-06-201-6/+32
|\ | | | | | | | | rpc: Minor docs improvements See merge request tpo/core/arti!1260
| * rpc: Expand and clarify and cross-reference lock hierarchyIan Jackson2023-06-161-6/+32
| |
* | Fix compilation afver last suggestion.Nick Mathewson2023-06-161-1/+2
| |
* | Apply 1 suggestion(s) to 1 file(s)Ian Jackson2023-06-161-0/+1
|/
* rpc: Document and apply lock hierarchy for Mgr/ConnectionNick Mathewson2023-06-151-4/+13
|
* rpc: Give the session-creation function an argument.Nick Mathewson2023-06-151-7/+5
| | | | | | This will later let us tell the session-creation function how the authentication occurred, which will let it decide what privileges to provide.
* rpc: revise session initialization a lot.Nick Mathewson2023-06-151-14/+23
| | | | | | | | | | | | | | Formerly, every time we wanted to launch a new connection, we had to give the RpcMgr a TorClient. The connection would hold that TorClient until a session was authenticated, and then would wrap it in a Session and put it in the object map. Now, the RpcMgr holds a Box<dyn Fn()...> that knows how to create Sessions. When a connection is authenticated, it asks the Mgr to make it a new session. This lets us make it clearer that the TorClient simply can't be given out until the connection is authenticated. Later, it will let us create more types of Session objects under more complicated rules.
* RPC: rename new_session to new_connectionNick Mathewson2023-06-151-1/+1
|
* rpc: revise the relationship between Mgr and ConnectionNick Mathewson2023-06-141-20/+22
| | | | | | | | This adds a Weak reference from Connection to Mgr, makes DispatchTable mutable, and makes a few other changes as discussed between me and Diziet the other week. I bet we are not done tweaking this, but I hope it's a setp forwards.
* RPC: Note a possible API change in RpcMgr::new.Nick Mathewson2023-06-051-0/+4
|
* RPC: Give out and accept GlobalIds for appropriate objects.Nick Mathewson2023-06-051-0/+1
|
* RPC: Implement a "global identifier" for non-session-bound IDsNick Mathewson2023-06-051-1/+32
| | | | | | | 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: Slightly refactor GenIdx encoding.Nick Mathewson2023-06-051-1/+1
|
* rpc: Give RpcMgr a registry of connections.Nick Mathewson2023-06-051-5/+50
| | | | | We're going to use this to implement arti#863, which requires that some RPC objects be globally nameable.
* rpc: Move Arc::new() to RpcMgr code.Nick Mathewson2023-06-051-2/+2
|
* RPC: Rename session.rs to connection.rsNick Mathewson2023-05-041-1/+1
|
* RPC: rename Session to Connection.Nick Mathewson2023-05-041-3/+3
| | | | | | | 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.
* RPC: Make authentication return a TorClient.Nick Mathewson2023-05-041-8/+4
| | | | | | (This is the correct capabilities-based behavior. For now it will only work if the TorClient uses a PreferredRuntime, but with luck we will find a solution for #837 soon.)
* RPC: Start on plumbing TorClient into our RPC codeNick Mathewson2023-05-041-3/+8
| | | | | Because of #837, we won't be able to work with _every_ TorClient<R>, so I'm only going to be using TorClient<PreferredRuntime> for now.
* RPC: Move the "listen" part of the RPC listener code to `arti`.Nick Mathewson2023-05-041-1/+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/+38
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