summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | keymgr: Add an error variant for fs_mistrust errors.Gabriela Moldovan2023-06-202-0/+14
| | | | | | | | | | | | | | | 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-194-37/+158
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | 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-163-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | | |
| * | | | rpc: revise the relationship between Mgr and ConnectionNick Mathewson2023-06-143-27/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge branch 'netdoc-todos' into 'main'Nick Mathewson2023-06-1616-135/+119
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolve many TODO HS items in tor-netdoc See merge request tpo/core/arti!1251
| * | | | | hsdesc.rs: finally remove "allows".Nick Mathewson2023-06-162-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last piece here is removing some needless keygen from the tests. This causes the test output (using the deterministic PRNG) to change.
| * | | | | netdoc::doc::hsdesc changes to let us downgrade/remove allowsNick Mathewson2023-06-166-10/+9
| | | | | |
| * | | | | netdoc: unmark MAC_KEY_LEN as conjectural.Nick Mathewson2023-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value here is 32 bytes; I'm adding it to to the specification as torspec!141
| * | | | | SharedRandVal: Note that it doesn't have to be Ct.Nick Mathewson2023-06-161-2/+1
| | | | | |
| * | | | | netdoc: remove a TODO about moving a module to where it already is.Nick Mathewson2023-06-161-2/+0
| | | | | |