aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | arti-client: Add more dummy keymgr APIs.Gabriela Moldovan2023-06-201-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | This will help us reduce the number of `#[cfgs(...)]` from `client.rs` Part of #897
| * | | arti-client: Add a result type for the dummy keymgr impl.Gabriela Moldovan2023-06-201-3/+6
| | | | | | | | | | | | | | | | Part of #897
| * | | arti-client: Add an Error type for the dummy key manager.Gabriela Moldovan2023-06-202-7/+15
| | | | | | | | | | | | | | | | Part of #897
* | | | Merge branch 'keymgr-mistrust' into 'main'gabi-2502023-06-205-11/+97
|\| | | | | | | | | | | | | | | | | | | keymgr: First steps towards path validation and permission checks See merge request tpo/core/arti!1255
| * | | arti-client, keymgr: Introduce Mistrust settings and enforce FS permissions.Gabriela Moldovan2023-06-202-8/+44
| | | |
| * | | arti-client: Temporarily ignore key store errors.Gabriela Moldovan2023-06-201-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently initialize the `ArtiNativeKeyStore` with a dummy root dir, so when `ArtiNativeKeyStore` starts validating directories, this code will start to fail. Let's preemptively ignore any errors coming from `ArtiNativeKeyStore::new`. This is temporary and will be removed when we introduce the key store config (and a real default value for the keystore root dir).
| * | | keymgr: Add TODO about separation of concerns wrt FS operations.Gabriela Moldovan2023-06-201-0/+8
| | | |
| * | | keymgr: Add an error variant for fs_mistrust errors.Gabriela Moldovan2023-06-203-0/+15
| | | | | | | | | | | | | | | | | | | | This will be useful later, when `KeyMgr` will start validating permissions and paths.
| * | | keymgr: Add a FsErrorSource to Error::Fs.Gabriela Moldovan2023-06-201-1/+21
|/ / / | | | | | | | | | | | | | | | In the future, the potential causes of an `Error::Filesystem` error will include permission errors as well as other errors (not just `io::Error`s).
* | | Merge branch 'circmgr-todos' into 'main'Nick Mathewson2023-06-203-59/+196
|\ \ \ | | | | | | | | | | | | | | | | Resolve several "TODO HS" comments in circmgr. See merge request tpo/core/arti!1258
| * | | Typo fixesgabi-2502023-06-201-2/+2
| | | |
| * | | circmgr: Use a slightly nicer way to pick a circuit from our pool.Nick Mathewson2023-06-161-13/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This algorithm only looks at circuits until it finds one that satisfies our needs. To get a random circuit, it just randomizes the starting point within the pool. This optimization may help if we let circuit pools grow large.
| * | | circmgr: Make hspool size dynamicNick Mathewson2023-06-162-28/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we'd always try to keep 8 circuits ready. That doesn't make sense if we are super-busy. Instead, if we run out of circuits, we double the amount that we try to keep ready, and if we never go under 80% of our target number, we half the number we try to keep ready. We limit the rate of change here, to make sure that we aren't flapping too much or shrinking too aggressively. This algorithm is still a mite arbitrary, and will need tuning in the future.
| * | | circmgr::hspool: Move the Mutex into an intermediary Inner structNick Mathewson2023-06-162-35/+53
| | | | | | | | | | | | | | | | This will be helpful as we complexify the pool behavior a bit.
| * | | circmgr: Remove TODOS about retrying.Nick Mathewson2023-06-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | These functions' documentation already says that they don't retry, and hsclient appears to be where we are concentrating our retry efforts.
| * | | cirmgr: remove a dead-code exception.Nick Mathewson2023-06-161-1/+0
| | | |
* | | | Merge branch 'rpcdoc' into 'main'Ian Jackson2023-06-204-7/+53
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | rpc: Minor docs improvements See merge request tpo/core/arti!1260
| * | | | rpc: Fix docs typoNick Mathewson2023-06-201-1/+1
| | | | |
| * | | | rpc: Cross-reference up from tor-rpcbase re where DispatchTable livesIan Jackson2023-06-161-0/+2
| | | | |
| * | | | rpc: Expand and clarify and cross-reference lock hierarchyIan Jackson2023-06-162-6/+34
| | | | |
| * | | | rpc: Document relationship between `Connection` and `RpcSession`Ian Jackson2023-06-162-1/+17
| | | | |
* | | | | Merge branch 'arti-client' into 'main'Alexander Færøy2023-06-195-37/+159
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | Sort out .onion handling in arti-client See merge request tpo/core/arti!1257
| * | | | arti-client: hs: remove some now-obsolete allowsIan Jackson2023-06-161-3/+0
| | | | |
| * | | | arti-client: address: Prefer to throw OnionAddressResolveRequest (fmt)Ian Jackson2023-06-161-9/+7
| | | | |
| * | | | arti-client: address: Prefer to throw OnionAddressResolveRequestIan Jackson2023-06-161-7/+23
| | | | | | | | | | | | | | | | | | | | Reformatting deferred for clarity.
| * | | | arti-client: hs: Test cases for variously disabling .onionIan Jackson2023-06-161-1/+57
| | | | | | | | | | | | | | | | | | | | This test case shows that we return a suboptimal error in some cases.
| * | | | arti-client: Provide ErrorDetailDiscriminants for convenient testingIan Jackson2023-06-164-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | ErrorDetail isn't PartialEq so we can't assert_eq! it. But the discriminants will be.
| * | | | arti-client: StreamPrefs::connect_to_onion_services: honourIan Jackson2023-06-163-2/+20
| | | | |
| * | | | arti-client: StreamPrefs::connect_to_onion_services: docsIan Jackson2023-06-161-1/+6
| | | | | | | | | | | | | | | | | | | | This disposes of the TODO as well.
| * | | | arti-client: StreamPrefs::connect_to_onion_services: fix cfgIan Jackson2023-06-161-1/+1
| | | | |
| * | | | arti-client: StreamPrefs::connect_to_onion_services: fix nameIan Jackson2023-06-161-1/+1
| | | | |
| * | | | Added setter method in impl for StreamPrefsnate_d1azzz2023-06-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Taken from tpo/core/arti!1113 and squashed by Ian Jackson, with conflicting hunk in StreamPrefs struct skipped. The setter name is wrong, the cfg feature is wrong, there are no docs, and the TODO is still there. These will be fixed in a moment.)
| * | | | arti-client hs: connect_to_onion_services: default to trueIan Jackson2023-06-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This should be enabled by default. There's still no setter for not, nor is it honoured - those are separate TODOs.
| * | | | arti-client: OnionAddressNotSupported: Change description and kindIan Jackson2023-06-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Previously this error meant "we haven't written this code yet". Now, we change it to "you haven't built Arti with this feature".
| * | | | arti-client: address: Apply deferred rustfmt churnIan Jackson2023-06-161-2/+6
| | | | |
| * | | | arti-client: address: Plumb StreamPrefs into enforce_configIan Jackson2023-06-162-7/+12
| | | | | | | | | | | | | | | | | | | | No functional change yet. We'll use this shortly.
| * | | | arti-client: address: Move config enforcementIan Jackson2023-06-162-9/+11
| | | | | | | | | | | | | | | | | | | | Disposes of two TODOs.
| * | | | arti-client: address: Move config enforcement (pre-fmt)Ian Jackson2023-06-161-2/+6
| | | | | | | | | | | | | | | | | | | | This will make subsequent commits less noisy to read.
| * | | | arti-client: address: Disable some tests when HS disabledIan Jackson2023-06-161-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | These have already been partially/replaced supplemented. The other test referred to will appear shortly.
* | | | | Merge branch 'rpc_session_mgt' into 'main'Nick Mathewson2023-06-168-92/+138
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | More work on RPC sessions, connections, and managers See merge request tpo/core/arti!1254
| * | | | | 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-155-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-155-44/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Session=>RpcSessionNick Mathewson2023-06-153-9/+9
| | | | |
| * | | | rpc: Expose Session object.Nick Mathewson2023-06-152-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | We'll want to move the responsibility for creating Sessions outside the rpcmgr crate.
| * | | | RPC: rename new_session to new_connectionNick Mathewson2023-06-152-2/+2
| | | | |
| * | | | rpc: switch GlobalId mac to KMAC.Nick Mathewson2023-06-142-15/+5
| | | | |
| * | | | rpc: connection_id _is_ used: remove a comment to the contraryNick Mathewson2023-06-141-3/+0
| | | | |