summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | 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.
* | | | 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
|/ / /
* | | 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-272-1/+78
| | | | | | | | | | | | This finally makes this type suitable for parsing in config files.
* | | byte_qty: Implement FromStr, and improve Display implIan Jackson2024-08-272-7/+190
| | | | | | | | | | | | 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.
* | | tor-memquota: Move the macro-containing modules earlier in the lib.rsIan Jackson2024-08-271-2/+3
| |/ |/| | | | | | | | | This makes more sense than having them alphabetical. Noticed while I was working on moving other code.
* | Merge branch 'ci' into 'main'Ian Jackson2024-08-277-7/+24
|\ \ | |/ |/| | | | | Run tests of every crate, with all features disabled See merge request tpo/core/arti!2350
| * Add script for *testing* without any features enabledIan Jackson2024-08-193-0/+9
| | | | | | | | | | | | | | | | | | We can't do this for every crate. I looked at what is now matrix-check to see if I wanted to use any of the code. But it seems too entangled with its particular purpose, and has a lot of embedded knowledge of our crates' features. I found it sufficiently far from what I wanted that I decided on a fresh script.
| * arti: Fix an unused Result in tests if pts disabledIan Jackson2024-08-191-1/+2
| | | | | | | | | | Fixes compilation with cargo test --no-default-features -p arti --features=tokio,rustls
| * fs-mistrust: Make fake PathExt return impl DisplayIan Jackson2024-08-191-3/+4
| | | | | | | | Otherwise it doesn't compile when actually used.
| * fs-mistrust: Make a comment into a docIan Jackson2024-08-191-2/+2
| | | | | | | | Placates clippy.
| * fs-mistrust: Decorate some items with missing walkdir cfgIan Jackson2024-08-193-1/+7
| |
* | tor-proto circuit: add unit test for fairnessJim Newsome2024-08-221-0/+128
| |
* | arti: Temporarily disable a flaky test.Gabriela Moldovan2024-08-221-0/+1
| | | | | | | | Disabling until #1549 is fixed to unblock CI.
* | Merge branch 'live-reload' into 'main'gabi-2502024-08-2211-319/+1184
|\ \ | | | | | | | | | | | | | | | | | | tor-hsservice: Add watcher for restricted_discovery config changes Closes #1505 See merge request tpo/core/arti!2353
| * | arti: Use a postage::watch channel in the tests.Gabriela Moldovan2024-08-222-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | The watch channel should help prevent flakiness in the tests (`TestModule` uses `maybe_send` to only send the received config if it's different from the previously received value. This is supposed to prevent the tests from failing when duplicate update events are received).
| * | arti: Add test for config reloading.Gabriela Moldovan2024-08-212-0/+175
| | |
| * | arti: Wrap long lines not handled by rustfmt.Gabriela Moldovan2024-08-211-2/+14
| | |
| * | tor-hsservice: Add a TODO about rethinking publish rate-limiting.Gabriela Moldovan2024-08-211-0/+11
| | |
| * | tor-hsservive: Document how restricted discovery live reloading works.Gabriela Moldovan2024-08-211-0/+48
| | |
| * | tor-hsservice: Remove a TODO that is no longer relevant.Gabriela Moldovan2024-08-211-16/+1
| | | | | | | | | | | | This is now implemented.
| * | tor-config: Write tests for FileWatcher.Gabriela Moldovan2024-08-212-3/+145
| | |
| * | tor-config: Add a TODO about relocating file_watcher.Gabriela Moldovan2024-08-211-0/+3
| | |
| * | tor-hsservice: Add TODO about updating publisher status on error.Gabriela Moldovan2024-08-211-0/+1
| | | | | | | | | | | | | | | This is a general issue with the publisher that will need to be addressed soon.
| * | tor-hsservice: Update the authorized_clients and watcher when the config ↵Gabriela Moldovan2024-08-211-1/+5
| | | | | | | | | | | | changes.
| * | tor-hsservice: Store a FileWatcher in the publisher reactor.Gabriela Moldovan2024-08-211-2/+137
| | | | | | | | | | | | | | | This `FileWatcher` is watching the `restricted_discovery.key_dirs` directories for changes.
| * | tor-config: Add getters for FileWatcher.Gabriela Moldovan2024-08-212-1/+10
| | | | | | | | | | | | | | | | | | | | | Sometimes it's useful to know what files/directories are being watched. For example, the descriptor publisher needs to know in order to figure out if it needs to update the watcher in response to changes in the config.
| * | tor-hsservice: Pass watch_configuration down to restricted discovery config.Gabriela Moldovan2024-08-212-7/+31
| | | | | | | | | | | | | | | | | | We need to know if `watch_configuration` is set in the descriptor publisher reactor to know whether we should be watching the `restricted_discovery.key_dirs` directories.
| * | tor-hsservice: Derive getters for OnionServiceConfig, RestrictedDiscoveryConfig.Gabriela Moldovan2024-08-212-7/+5
| | |
| * | tor-hsservice: Schedule descriptor republication whenever the key_dirs ↵Gabriela Moldovan2024-08-211-1/+57
| | | | | | | | | | | | contents change.
| * | tor-hsservice: Add helper for reading authorized_clients.Gabriela Moldovan2024-08-211-8/+17
| | | | | | | | | | | | | | | This will soon be used in the `key_dirs` change handler, which will re-read the authorized_clients list.
| * | tor-hsservice: Add channel for receiving key_dirs change events.Gabriela Moldovan2024-08-211-0/+11
| | |
| * | tor-hsservice: Log a message whenever restricted discovery mode is toggled.Gabriela Moldovan2024-08-211-0/+13
| | |
| * | tor-hsservice: Only republish if the config changes are relevant.Gabriela Moldovan2024-08-211-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the publisher would always publish a new descriptor if the config changed. Now, it only republishes if the parts of the config that changed are relevant (i.e. if they are part of `OnionServiceConfigPublisherView`). A future change will make it so that we trigger a republish task whenever the restricted discovery mode authorized clients change. This will involve looking at the contents of the configured `key_dirs`, as well as the `OnionServiceConfigPublisherView`.