summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | tor-config: flatten: Break out flattenable_extract_fieldsIan Jackson2023-09-202-25/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This involves returning the field list in the `FlattenableTesterSuccess`. This leaves the names a little off; we'll update those at the end. Export this - it's going to replace the hidden pub test function.
| * | | | tor-config: flatten: Introduce FieldList type aliasIan Jackson2023-09-201-6/+9
| | | | | | | | | | | | | | | | | | | | We're going to use this some more, even.
| * | | | tor_config: flatten: Abolish FlattenErrorIan Jackson2023-09-201-38/+9
| | | | |
| * | | | tor_config: flatten tests: Remove the obsolete todoIan Jackson2023-09-201-1/+0
| | | | |
| * | | | tor_config: Add a note about FlattenErrorIan Jackson2023-09-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1605#note_2945202
| * | | | tor_config: Flatten: Explain why the inner ref Flatten for serIan Jackson2023-09-201-0/+5
| | | | |
| * | | | tor_config: Flatten: Add missing tst annotationIan Jackson2023-09-201-0/+1
| | | | |
| * | | | tor_config: Provide FlattenIan Jackson2023-09-204-0/+690
| |/ / / | | | | | | | | | | | | | | | | This is an attempt to deal with the fact that `#[serde(flatten)]` is weirdly broken and doesn't work with `serde_ignored`.
* | | | tor-hsservice: Make the publisher compile again.Gabriela Moldovan2023-09-202-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The compile error happened because there was a conflict between arti!1603 and arti!1599: * the patch from !1603 uses `OnionServiceConfig::encrypt_descriptor` * !1599 removes `encrypt_descriptor` altogether
* | | | Merge branch 'publish-on-state-change' into 'main'gabi-2502023-09-202-236/+383
|\ \ \ \ | |/ / / |/| | | | | | | | | | | tor-hsservice: Descriptor publisher improvements See merge request tpo/core/arti!1603
| * | | tor-hsservice: Add TODO regarding DescriptorConfigView.Gabriela Moldovan2023-09-191-0/+4
| | | | | | | | | | | | | | | | See https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1603#note_2944902
| * | | tor-hsservice: Do not discard the runtime.spawn() Result (fmt).Gabriela Moldovan2023-09-191-18/+21
| | | |
| * | | tor-hsservice: Do not discard the runtime.spawn() Result.Gabriela Moldovan2023-09-191-16/+28
| | | |
| * | | tor-hsservice: Add an explicit Idle state for the publisher reactor.Gabriela Moldovan2023-09-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code was correct too: after uploading the descriptor, the `PublishStatus` is not updated, because the reactor is still in a state where it has enough information to publish descriptors. Note that simply "being" in the `UploadScheduled` state isn't enough to trigger another upload, because `publish_status_rx.next()` (from the `select_biased!` of the main-loop), blocks until something triggers another state transition (`AwaitingIpts` -> `UploadScheduled`, or even `UploadScheduled` -> `UploadScheduled`), so while a third state is not strictly necessary, it does help with readability.
| * | | tor-hsservice: Use Instant instead of Duration for rescheduling uploads.Gabriela Moldovan2023-09-191-6/+31
| | | | | | | | | | | | | | | | This also documents how updates are rescheduled.
| * | | tor-hsservice: Remove stray doc comment.Gabriela Moldovan2023-09-191-1/+0
| | | |
| * | | tor-hsservice: Make some publisher functions synchronous.Gabriela Moldovan2023-09-191-13/+13
| | | | | | | | | | | | | | | | | | | | Now that we've switched to `std::sync::Mutex` many publish functions no longer need to be async.
| * | | tor-hsservice: Use std::sync::Mutex instead of the one from futures (fmt).Gabriela Moldovan2023-09-191-1/+4
| | | |
| * | | tor-hsservice: Use std::sync::Mutex instead of the one from futures.Gabriela Moldovan2023-09-191-10/+9
| | | |
| * | | tor-hsservice: Run cargo fmt.Gabriela Moldovan2023-09-191-69/+74
| | | |
| * | | tor-hsservice: s/handle_new_intro_points/handle_ipt_changeGabriela Moldovan2023-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | `handle_ipt_change` no longer handles the new intro points: it now handles the IPT _change_ by updating the publish state of the reactor.
| * | | tor-hsservice: Borrow the IPT set from the IPT manager.Gabriela Moldovan2023-09-191-3/+13
| | | |
| * | | tor-hsservice: Discard the task handle and propagate any errors.Gabriela Moldovan2023-09-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't really need to keep the handles around, so let's just discard them. This also updates `upload_all` to propagate any errors coming from `build_sign`.
| * | | tor-hsservice: Republish according to IPT manager instructions.Gabriela Moldovan2023-09-191-21/+28
| | | |
| * | | tor-hsservice: Implement handle_svc_config_change.Gabriela Moldovan2023-09-191-5/+33
| | | |
| * | | tor-hsservice: Add helper for marking all descriptors dirty.Gabriela Moldovan2023-09-191-0/+17
| | | |
| * | | tor-hsservice: Use PublishState to decide when to upload the descriptor.Gabriela Moldovan2023-09-191-5/+68
| | | |
| * | | tor-hsservice: Use postage::watch to watch for pending updates.Gabriela Moldovan2023-09-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make sense to use an mpsc channel for rescheduling the rate-limited uploads. If we use an mpsc channel and `upload_all` is called multiple times in a short timespan, we will end up scheduling more than 1 upload reattempt. So let's use postage::watch instead.
| * | | tor-hsservice: Update docs regarding desc upload rate-limiting.Gabriela Moldovan2023-09-191-9/+11
| | | | | | | | | | | | | | | | | | | | This updates the docs (and renames the channel for rescheduling rate-limited uploads) for clarity.
| * | | tor-hsservice: Fill out some todo!()s with info from the config.Gabriela Moldovan2023-09-191-2/+12
| | | |
| * | | tor-hsservice: Remove descriptor builder from publisher (fmt).Gabriela Moldovan2023-09-191-57/+57
| | | |
| * | | tor-hsservice: Remove descriptor builder from publisher.Gabriela Moldovan2023-09-192-71/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't actually need an intermediate `Descriptor` struct (and keeping a builder around doesn't make much sense either): * the information from the onion service config can just be read from the `config` field of the `Inner` (mutable) reactor state * the IPT information is retrieved right before building the descriptor * any key information will (eventually) be read from the `KeyMgr`
| * | | tor-hsservice: Remove unnecessary allow annotations.Gabriela Moldovan2023-09-191-2/+0
| | | |
* | | | hss: Flatten limit and pow fields into main configNick Mathewson2023-09-191-46/+25
| | | | | | | | | | | | | | | | | | | | | | | | See thread at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1599#note_2944510 for information about why `flatten` doesn't work here.
* | | | hsrproxy: rename Direct => Simple.Nick Mathewson2023-09-191-21/+24
| | | |
* | | | hss: make config subbuilders get flattened.Nick Mathewson2023-09-191-0/+2
| | | | | | | | | | | | | | | | This matches our design.
* | | | hss: Rename ProxyTarget to ProxyAction.Nick Mathewson2023-09-191-16/+16
| | | |
* | | | hsproxy: Revise configuration based on discussionNick Mathewson2023-09-191-41/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have a single ProxyTarget action for the case where we accept a request and forward it: `Forward`. It takes an encapsulation method (currently only "direct") and a target address which can be inet or unix.
* | | | hsrproxy: test actual outputs of builder.Nick Mathewson2023-09-191-1/+10
| | | |
* | | | hsproxy: reject configurations with unreachable patterns.Nick Mathewson2023-09-192-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This implementation uses rangemap to detect _all_ unreachable patterns, which might be a little overkill, but it's actually simpler to write it this way than to use an O(N^2) search to make sure that no pattern is covered by a _single_ previous pattern.
* | | | hss: Make the config builders serde.Nick Mathewson2023-09-191-9/+17
| | | | | | | | | | | | | | | | | | | | Temporarily disable descriptor encryption configuration while we figure out how it should work (see #1028)
* | | | hsrproxy: Say "one", not "single" to avoid confusion.Nick Mathewson2023-09-191-1/+1
| | | |
* | | | hss: Wrap Cargo.toml.Nick Mathewson2023-09-191-1/+16
| |/ / |/| |
* | | Merge branch 'partial-eqs' into 'main'Alexander Færøy2023-09-193-3/+9
|\| | | | | | | | | | | | | | tor-hsservice: Implement PartialEq for HsClientDescEncKey, Anonimity, DescEncryptionConfig See merge request tpo/core/arti!1601
| * | tor-hsservice: Derive PartialEq for Anonimity and DescEncryptionConfig.Gabriela Moldovan2023-09-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will enable the descriptor publisher to tell whether it needs to update the descriptor. When the publisher is notified of an `OnionServiceConfig` change, it checks whether the `anonimity` or `encrypt_descriptor` fields have changed. If they have, it rebuilds and republishes the descriptor using the new values (note: the publisher changes will be implemented in a future commit).
| * | tor-hscrypto: Implement PartialEq for HsClientDescEncKey.Gabriela Moldovan2023-09-181-0/+6
| |/ | | | | | | Needed to implement `PartialEq` for `AuthorizedClientConfig`.
* | Merge branch 'ipt-accepting' into 'main'Nick Mathewson2023-09-181-29/+58
|\ \ | |/ |/| | | | | tor-hsservice: ipt mgr: Notify Establisher to start accepting See merge request tpo/core/arti!1598
| * tor-hsservice: ipt mgr: Apply deferred rustfmt churnIan Jackson2023-09-181-3/+1
| |
| * tor-hsservice: ipt mgr: Remove some allowsIan Jackson2023-09-181-4/+0
| |
| * tor-hsservice: ipt mgr: Instruct Establisher to start acceptingIan Jackson2023-09-181-1/+12
| |