summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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`.
| * | tor-hsservice: Make restricted_discovery updateable.Gabriela Moldovan2024-08-211-1/+1
| | |
| * | tor-hsservice: Make the reactor take a reference to the config.Gabriela Moldovan2024-08-212-3/+3
| | | | | | | | | | | | This resolves a clippy warning.
| * | tor-hsservice: Use OnionServiceConfigPublisherView in the publisher.Gabriela Moldovan2024-08-212-16/+11
| | | | | | | | | | | | | | | Resolves the TODO prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1603#note_2944902
| * | tor-hsservice: Create a type for the descriptor publisher's view of the config.Gabriela Moldovan2024-08-211-1/+49
| | | | | | | | | | | | | | | Partially addresses https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1603#note_2944902
| * | tor-hsservice: Log the client nicknames the descriptor is encrypted for.Gabriela Moldovan2024-08-211-1/+4
| | | | | | | | | | | | Knowing the nicknames can be useful when debugging.
| * | tor-hsservice: Log if we are about to generate a new descriptor.Gabriela Moldovan2024-08-211-0/+1
| | |
| * | tor-config: Support watching dirs for files with a given extension (fmt).Gabriela Moldovan2024-08-211-2/+9
| | |
| * | tor-config: Support watching dirs for files with a given extension.Gabriela Moldovan2024-08-212-20/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes a couple of issues with the previous implementation: * it enables you to watch for more than just one file/extension per directory (each directory now has a list of filters. If any of the filters apply to the path contained in the notify::Event, the `FilterWatcher` notifies the listeners * it removes the list watched files from `FileWatcher`. This makes things a lot simpler to grok: essentially, the file watcher only ever watches directories, notifying if an "interesting" file was changed (in our case, the interesting files are files that have a relevant extension, such as `.auth`, or specific configuration files, as specified by `ConfigurationSources`).
| * | tor-config: Move event handling to a separate function.Gabriela Moldovan2024-08-211-20/+30
| | | | | | | | | | | | | | | This will soon grow more complex, so I am preemptively moving it out of `start_watching`.
| * | tor-config: Remove unused Event::SigHup variant.Gabriela Moldovan2024-08-211-3/+0
| | | | | | | | | | | | | | | We don't need this variant anymore, because sighup is now handled separately from `FileWatcher` events.
| * | tor-config: Make FileWatcher use an opaque channel type.Gabriela Moldovan2024-08-213-94/+176
| | | | | | | | | | | | The `FileWatcher` now uses a `postage::watch` channel under the hood.
| * | tor-config: Give FileWatcherBuilder a handle to the runtime.Gabriela Moldovan2024-08-213-16/+17
| | | | | | | | | | | | | | | The event handler will soon be made async, so we need a handle to the runtime.
| * | tor-config: Move FileWatcher to tor-config.Gabriela Moldovan2024-08-214-185/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | For the most part, this is just code motion. The only change here is that `prepare` is no longer a method on `FileWatcher`. This decouples `FileWatcher` from `ConfigurationSources`, enabling us to use it to watch files and directories that aren't configuration.
| * | arti: Update outdated FileWatcher docs.Gabriela Moldovan2024-08-211-5/+1
| | | | | | | | | | | | | | | The `FileWatcher` doesn't contain the channel for receiving events anymore, and `FileWatcher::event_matched` was removed at some point.
* | | Merge branch 'document-data-streams' into 'main'Nick Mathewson2024-08-223-3/+22
|\ \ \ | | | | | | | | | | | | | | | | Circuit reactor: improve code comments See merge request tpo/core/arti!2358
| * | | flow-control: document idea for making more robustJim Newsome2024-08-212-0/+11
| | | | | | | | | | | | | | | | | | | | From <https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2340#note_3062531>
| * | | Circuit reactor: improve code commentsJim Newsome2024-08-211-3/+11
| | | | | | | | | | | | | | | | | | | | In particular, clarify that stream-flow-control msgs don't get blocked on circuit congestion control.
* | | | Merge branch 'optional-managed-pts' into 'main'Nick Mathewson2024-08-225-455/+583
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | tor-ptmgr: make managed PTs optional ('managed-pts' feature flag) Closes #1334 See merge request tpo/core/arti!2354
| * | | tor-ptmgr: added a 'managed-pts' default featureSteven Engler2024-08-214-82/+124
| | | | | | | | | | | | | | | | | | | | This conditionally compiles most of the code related to managed transports.
| * | | tor-ptmgr: break out `spawn_transport` into separate functionSteven Engler2024-08-201-33/+38
| | | |
| * | | tor-ptmgr: moved `PtClientMethod` from ipc to crate moduleSteven Engler2024-08-202-22/+24
| | | |
| * | | tor-ptmgr: move some code to a new 'managed' moduleSteven Engler2024-08-203-312/+331
| | | | | | | | | | | | | | | | | | | | | | | | Code that's related to managed transports has been moved to a new 'managed' module. This includes the PT reactor since it's not needed for unmanaged transports.
| * | | tor-ptmgr: fix warnings when 'tor-channel-factory' isn't enabledSteven Engler2024-08-202-3/+7
| | | |
| * | | tor-ptmgr: added the `TransportOptions` enumSteven Engler2024-08-202-43/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a little nicer and more type-safe to work with than `TransportConfig`. It would have been nice to change `TransportConfig` directly instead, but it would slightly change arti_client's public API, and would require an extra field in the `[[bridges.transports]]` toml table.
* | | | Merge branch 'peekable-poll-set' into 'main'Jim Newsome2024-08-2110-291/+496
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | Add and use `PeekableStream` and `UnobtrusivePeekableStream` See merge request tpo/core/arti!2345
| * | | StreamPollSet: disallow polling ready streamsJim Newsome2024-08-212-30/+46
| | | |
| * | | StreamMap: Use StreamUnobtrusivePeeker instead of PeekableJim Newsome2024-08-212-4/+9
| | | |
| * | | Expose stream_peekJim Newsome2024-08-212-6/+18
| | | |
| * | | PeekFuture: implement for all PeekableStreamJim Newsome2024-08-211-5/+6
| | | |
| * | | StreamUnobtrusivePeeker: implement PeekableStream and UnobtrusivePeekableStreamJim Newsome2024-08-213-41/+15
| | | |
| * | | tor-proto: Use PeekableStream to get rid of redundant bufferingJim Newsome2024-08-213-235/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update `StreamPollSet` to require that its streams implement `PeekableStream`, and to not do its own buffering of values read from the stream. This avoids an extra layer of buffering for streams that already buffer a value, and makes the interior state a little simpler and more robust. It does have a downside of making the API a little less convenient, since the caller must do its own `poll_peek` call if it wants a reference to the item. * Update `StreamMap` to implement `PeekableStream` for `OpenStreamEntStream`, as it must to satisfy the updated `StreamPollSet` API. We have to somewhat constrain the `poll_ready_streams_iter` API to no longer return both a reference to the stream and the message. I don't see a way to return both while satisfying the borrow checker. Luckily we don't really need both anymore. * Update the Circuit reactor to handle the updated `StreamMap::poll_ready_streams_iter` API.
| * | | tor-async-utils: add traits PeekableStream and UnobtrusivePeekableStreamJim Newsome2024-08-212-0/+129
| | |/ | |/|
* | | Merge branch 'ticket-1504' into 'main'Nick Mathewson2024-08-212-12/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | llcrypto: Make `blind_keypair` build without hsv3-client. Closes #1504 See merge request tpo/core/arti!2341
| * | | keymanip: Make blind_pubkey exist unconditionallyNick Mathewson2024-08-212-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now it exists unconditionally so that we can have our assertion for public key consistency happen unconditionally. (Blinding secret keys is not remotely in the critical path, so I'm not concerned about the critical path.) From a suggestion from Gabi on !2341.