summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | arti-client: Add an InertTorClient for accessing client state (fmt).Gabriela Moldovan2024-08-281-1/+3
| | | |
| * | | arti-client: Add an InertTorClient for accessing client state.Gabriela Moldovan2024-08-283-74/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the `TorClientThatIsntRunning` mentioned in !2314 (see also `doc/dev/notes/keymgr-porcelain.md`), except `TorClientThatIsntRunning` is called `InertTorClient`. This commit is mostly code motion: I've moved the `create_keymgr` function and the impls of `generate_service_discovery_key` and `get_service_discovery_key` from `TorClient` to `InertTorClient`. The `InertTorClient` advertises itself as a handle for accessing the keystores and other persistent state, but it currently only has 2 functions (`generate_service_discovery_key` and `get_service_discovery_key`). I expect it will grow additional functionality in the future.
| * | | arti-client: Move state_dir() to TorClientConfig.Gabriela Moldovan2024-08-282-17/+17
|/ / / | | | | | | | | | | | | I am about to use `state_dir()` outside of `TorClient`, so I am preemptively moving it to `TorClientConfig`.
* | | Merge branch 'move-stream-peak' into 'main'Jim Newsome2024-08-2848-81/+179
|\ \ \ | | | | | | | | | | | | | | | | extract tor_async_utils::oneshot into ::oneshot-fused-workaround See merge request tpo/core/arti!2371
| * | | tor-rtmock: remove dependency on tor-async-utilsJim Newsome2024-08-282-3/+1
| | | | | | | | | | | | | | | | | | | | Now that `oneshot-fused-workaround` is its own crate, `tor-rtmock` doesn't need `tor-async-utils`.
| * | | extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-2848-78/+178
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* | | Merge branch 'expose-proxy-setting' into 'main'Nick Mathewson2024-08-288-14/+311
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | RPC: Add experimental method to list SOCKS proxy addresses. Closes #1523 See merge request tpo/core/arti!2359
| * | | rpc: Use MockRuntime for set_proxy_info test.Nick Mathewson2024-08-283-2/+4
| | | |
| * | | rpc: Add a test for setting proxy info.Nick Mathewson2024-08-282-0/+43
| | | |
| * | | rpc: Rename E::SenderDroppedNick Mathewson2024-08-281-5/+6
| | | |
| * | | rpc: Try another incantation for watching for ProxyInfo.Nick Mathewson2024-08-281-13/+7
| | | |
| * | | rpc: Add another layer of indirection on proxyinfoNick Mathewson2024-08-282-3/+12
| | | |
| * | | rpc: Try using postage::watch to initialize ProxyInfo.Nick Mathewson2024-08-286-35/+82
| | | | | | | | | | | | | | | | | | | | (This is a bit trickier than I would like, but it ensures that we never return a "not initialized yet" code.)
| * | | Re-wrap a Cargo.toml.Nick Mathewson2024-08-281-1/+5
| | | |
| * | | RPC: Add experimental method to list SOCKS proxies.Nick Mathewson2024-08-285-16/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll need this for our rpc-library code to meaningfully open SOCKS connections. Closes #1523.
| * | | arti: Define a new ArtiRpcSession type.Nick Mathewson2024-08-285-4/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This type exists in the `arti` crate. It wraps and delegates to `arti_rpcserver::RpcSession`. Subsequent commits will use it to expose information from the `arti` crate to the RPC system; right now it does nothing.
| * | | rpcserver: Fix a trivial doc typo.Nick Mathewson2024-08-281-1/+1
| | | |
* | | | Merge branch 'publisher-file-watch' into 'main'gabi-2502024-08-283-81/+124
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-hsservice: Fix publisher config watching bug See merge request tpo/core/arti!2369
| * | | | tor-config: Improve FileWatcher documentation.Gabriela Moldovan2024-08-281-1/+12
| | | | |
| * | | | tor-config: Add tests for FileWatcher::watch_path.Gabriela Moldovan2024-08-281-0/+73
| | | | |
| * | | | tor-config: Make a test helper take a reference to TempTestDir.Gabriela Moldovan2024-08-281-2/+2
| | | | |
| * | | | tor-hsservice: Recreate the file watcher on every key_dir change event.Gabriela Moldovan2024-08-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that if a directory used as a `key_dir` is moved (e.g. renamed), and then moved back to its original location (the one specified in `key_dirs`), our watcher continues watching the `key_dirs` contents.
| * | | | tor-config: Rename watch_file to watch_path.Gabriela Moldovan2024-08-273-6/+6
| | | | | | | | | | | | | | | | | | | | `FileWatcher::watch_file` can be used with arbitrary paths.
| * | | | tor-hsservice: Make sure we always watch the parents of the key_dirs.Gabriela Moldovan2024-08-271-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | This ensures that if a `key_dir` is created after we start watching it (or if it's moved), we are still able to detect changes.
| * | | | tor-hsservice: Always recreate the file watcher if the config changes.Gabriela Moldovan2024-08-271-59/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While this means we will be recreating the watcher slightly more often than necessary, this new approach is less error-prone than what we had before.
* | | | | Merge branch 'runtime' into 'main'Nick Mathewson2024-08-281-0/+16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Discourage use of `tor_rtmock_test_with_*` macros See merge request tpo/core/arti!2372
| * | | | | Discourage use of `tor_rtmock_test_with_*` macrosIan Jackson2024-08-281-0/+16
| | |/ / / | |/| | | | | | | | | | | | | New tests should usually use tor_rtmock::MockRuntime.
* | | | | Merge branch 'update-circuit-comments' into 'main'Nick Mathewson2024-08-272-7/+1
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | tor-proto::circuit: remove some obsolete "limitations" comments See merge request tpo/core/arti!2366
| * | | | `tor_proto::channel`: update comment to point to `tor-chanmgr`Jim Newsome2024-08-271-2/+1
| | | | |
| * | | | `circuit` docs: delete comment about no flow-control etcJim Newsome2024-08-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | There is now (sendme-style) flow control, and some fairness (via round robin scheduling of streams).
| * | | | `circuit` docs: delete "one big mutex" limitationJim Newsome2024-08-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a mutex for some of the "mutable state", but the reactor only needs to lock it when adding a hop. It's not needed "to process a cell" or when streams send. Probably not worth calling out here.
* | | | | Merge branch 'rpclib-safer-handle' into 'main'Nick Mathewson2024-08-276-49/+46
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpclib, ffi: Allow simultaneous calls to `arti_rpc_handle_wait()` Closes #1532 See merge request tpo/core/arti!2360
| * | | | | rpclib: Remove in_mut_ptr_opt, and document why.Nick Mathewson2024-08-273-37/+22
| | | | | |
| * | | | | rpclib, ffi: Allow simultaneous calls to `arti_rpc_handle_wait()`Nick Mathewson2024-08-274-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its underlying function previously took `&mut RpcHandle`, which was an accident waiting to happen. Now it takes `&RpcHandle` and includes a Mutex to prevent multiple threads from waiting for updates on the same request ID at once. As an alternative, we *could* try to update connimpl::Receiver to allow multiple simultaneous listeners on the same request ID. But that would (I think) require a lot more bookkeeping, and thus would be a bit more error-prone. Closes #1532.
* | | | | | Merge branch 'move-stream-peek-prelim' into 'main'Jim Newsome2024-08-276-23/+18
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | Preliminaries for moving stream-peek into tor-async-utils See merge request tpo/core/arti!2362
| * | | | | check_toposort: Explain why we also check dev-dependenciesJim Newsome2024-08-271-0/+4
| | | | | |
| * | | | | Add comments explaining purpose of check_toposortJim Newsome2024-08-272-1/+8
| | | | | |
| * | | | | Expose StreamUnobtrusivePeeker::as_raw_inner_pin_mutJim Newsome2024-08-271-1/+1
| | | | | |
| * | | | | Remove NoopWaker; use futures::task::noop_waker_ref insteadJim Newsome2024-08-274-21/+5
|/ / / / /
* | | | | Merge branch 'qty' into 'main'Ian Jackson2024-08-2711-63/+431
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | Move Qty to tor-basic-utils as ByteQty and significantly improve it See merge request tpo/core/arti!2363
| * | | | Sort dependencies in tor-basic-utilsIan Jackson2024-08-271-1/+1
| | | | |
| * | | | Add ByteQty to semver.mdIan Jackson2024-08-271-0/+1
| | | | |
| * | | | byte_qty: Support deserialising from strings and floatsIan Jackson2024-08-273-1/+80
| | | | | | | | | | | | | | | | | | | | This finally makes this type suitable for parsing in config files.
| * | | | byte_qty: Implement FromStr, and improve Display implIan Jackson2024-08-273-7/+191
| | | | | | | | | | | | | | | | | | | | Display can now choose appropriate units.
| * | | | byte_qty: provide TryFrom<u64> and <f64>Ian Jackson2024-08-271-0/+76
| | | | |
| * | | | byte_qty: Make serde dependency optional in tor-basic-utilsIan Jackson2024-08-273-6/+10
| | | | |
| * | | | byte_qty: Split up the derivesIan Jackson2024-08-271-1/+2
| | | | | | | | | | | | | | | | | | | | The serde ones are going to need to be conditional.
| * | | | byte_qty: Move to tor-basic-utilsIan Jackson2024-08-278-5/+12
| | | | | | | | | | | | | | | | | | | | Code motion of byte_qty.rs, and minimal necessary supporting changes.
| * | | | byte_qty: Rename Qty to ByteQty and make it pubIan Jackson2024-08-272-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to make this into a proper public type. It's going to move into a different crate, where there's no prelude, so give it a bespoke set of imports too.
| * | | | byte_qty: Move Qty into its own module, byte_qty.Ian Jackson2024-08-274-57/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code motion, part 1. Also explain in comments at the top of the new module why we are doing this at all rather than using an existing thing.