summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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
|/
* Resolve unreachable_patterns warnings from nightly.Nick Mathewson2024-08-131-16/+13
| | | | | | | | | | | | | | Nightly rust doesn't like it when you have a `match` arm that can never be reached because of an uninhabited type. As such, we can't say stuff like: ``` let x: Option<Void> = ...; match x { Some(_) => unreachable!(), None => ... } ```
* tor-hsservice: Log whether the service is running in restricted discovery mode.Gabriela Moldovan2024-08-131-0/+12
|
* tor-hsservice: Move authorized_clients out of RunningOnionService.Gabriela Moldovan2024-08-133-31/+9
| | | | | | We now create the authorized_clients in the publisher (we don't need the authorized_clients anywhere else, so it makes little sense to keep them in `RunningOnionService`).
* tor-hsservice: Remove unnecessary docsrs cfg_attr.Gabriela Moldovan2024-08-071-1/+0
| | | | | The module is correctly documented as "only available on crate feature restricted-discovery" without it.
* tor-hsservice: Add comments about the cfg_attrs around restricted_discovery.Gabriela Moldovan2024-08-071-0/+3
|
* tor-hsservice: Add missing docsrs cfg to restricted_discovery module.Gabriela Moldovan2024-08-061-0/+1
| | | | | | | | | | | Without it, if the `restricted-discovery` feature is compiled out, the module gets documented as: ``` Non-restricted-discovery (Available on non-crate feature `restricted-discovery` only) ``` which is inaccurate.
* tor-hsservice: Add an extra log in the descriptor publisher.Gabriela Moldovan2024-08-051-0/+4
| | | | This helped me debug some shadow test failures.
* tor-hsservice: Fix broken doc links in RestrictedDiscoveryConfig.Gabriela Moldovan2024-08-051-6/+4
|
* tor-hsservice: Rewrite read_keys impl to be more functional.Gabriela Moldovan2024-08-051-21/+11
|
* tor-hsservice: Use DirEntry::file_name to simplify key file reading logic.Gabriela Moldovan2024-08-051-19/+14
|
* tor-hsservice: Reduce code duplication in restricted mode tests.Gabriela Moldovan2024-08-051-6/+3
|
* tor-hsservice: Give static_keys precedence over key_dirs (fmt).Gabriela Moldovan2024-08-053-16/+8
|
* tor-hsservice: Give static_keys precedence over key_dirs.Gabriela Moldovan2024-08-052-32/+100
| | | | | This rewrites `RestrictedDiscoveryConfig::read_keys` to give `static_keys` precedence over the keys from `key_dirs`.
* tor-hsservice: Do not error if there are more than ↵Gabriela Moldovan2024-08-053-93/+24
| | | | | | MAX_RESTRICTED_DISCOVERY_CLIENTS. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2266#note_3051758
* tor-hsservice: Add a note about live updates.Gabriela Moldovan2024-08-051-0/+7
|
* tor-hsservice: Use the configured authorized clients when encrypting the ↵Gabriela Moldovan2024-08-055-8/+49
| | | | descriptor.
* tor-hsservice: Remove unused import from internal prelude.Gabriela Moldovan2024-08-051-1/+0
| | | | | The base64ct dependency is now unused in tor-hsservice, so we should consider removing it at some point.
* tor-hsservice: Remove unused config types.Gabriela Moldovan2024-08-052-79/+1
|
* tor-hsservice: Store the client keys in RunningOnionService.Gabriela Moldovan2024-08-052-0/+41
|
* tor-hsservice: Use restricted config option in OnionServiceConfig.Gabriela Moldovan2024-08-051-13/+30
|
* tor-hsservice: Add restricted discovery configuration.Gabriela Moldovan2024-08-055-2/+918
|
* tor-hsservice: Add a restricted-discovery feature.Gabriela Moldovan2024-08-051-0/+11
| | | | | | | Restricted discovery mode is initially going to be gated behind the experimental `restricted-discovery` feature. Part of #1292
* tor-hsservice: Remove extraneous whitespace.Gabriela Moldovan2024-08-051-2/+2
|
* Bump versions for tor- and arti- crates to 0.21.0Nick Mathewson2024-08-011-26/+26
| | | | | | | | | | This is the result of: ``` for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do cargo set-version -p $crate 0.21.0 done ```
* tor-hsservice: Add OnionServiceBuilder, deprecate OnionService::new.Gabriela Moldovan2024-07-152-1/+36
| | | | Closes #1490
* tor-hsservice: Abolish OnionServiceState (fmt).Gabriela Moldovan2024-07-151-24/+27
| | | | Includes both `cargo fmt` and some manual code motion.
* tor-hsservice: Abolish OnionServiceState.Gabriela Moldovan2024-07-151-38/+21
| | | | | | | | | | | | | | | This removes a mostly-unnecessary struct holding the state of an `OnionService` or `RunningOnionService`. It only exists because I wanted to reduce the duplication of the `OnionService` and `RunningOnionService` fields. I am removing it because `OnionService` will soon become a builder, and this inner structure is making it difficult to create an ergonomic builder API (if we keep `OnionServiceState`, the builder fields won't map 1:1 to the fields of the build `OnionService` type). Note: this commit intentionally a bit misformatted to make reviewing easier. The reformatting will come in a future commit.
* tor-hsservice: Remove unnecessary let-binding.Gabriela Moldovan2024-07-091-1/+2
|
* tor-hsservice: Specify the type when discarding value.Gabriela Moldovan2024-07-092-3/+3
| | | | | | | This should give us some confidence that we are not accidentally discarding results we should actually be using. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2251#note_3046219
* tor-hsservice: Resolve dead code warnings in publisher tests.Gabriela Moldovan2024-07-091-11/+7
|
* tor-hsservice: Ignore uninteresting netdir events in the publisher.Gabriela Moldovan2024-07-091-1/+12
| | | | This also makes the publisher exit if the netdir event stream ends.
* tor-hsservice: Resolve warning about unused response variable.Gabriela Moldovan2024-07-091-1/+1
| | | | | | | | | It is OK to discard the response string (the response is validated below where we call `DirResponse::into_output_string()`). (Perhaps we should just make `DirResponse::check_ok()` public. That way, we could validate the response without having to handle its output string).
* tor-hsservice: Resolve a handful of unused variable warnings.Gabriela Moldovan2024-07-092-4/+4
|
* tor-hsservice: Remove unused field from TimePeriodContext.Gabriela Moldovan2024-07-091-3/+0
|
* tor-hsservice: Remove unused variables.Gabriela Moldovan2024-07-092-14/+0
|
* tor-hsservice: Remove unnecessary locking.Gabriela Moldovan2024-07-091-2/+0
|
* tor-hsservice: Remove unused code (fmt).Gabriela Moldovan2024-07-091-1/+1
|
* tor-hsservice: Remove unused code.Gabriela Moldovan2024-07-094-188/+1
| | | | This is being reimplemented as #1292
* tor-hsservice: Remove unused publisher functions.Gabriela Moldovan2024-07-092-13/+0
| | | | | | | This removes a couple of unimplemented functions. These were supposed to be the starting point for #1217, but we won't be implementing that any time soon.
* tor-hsservice: Remove unnecessary allow.Gabriela Moldovan2024-07-091-1/+0
| | | | Note: #1217 is still open and we may want to implement it at some point.
* Merge branch 'deftly' into 'main'Ian Jackson2024-07-081-1/+1
|\ | | | | | | | | Update to derive-deftly 0.14 See merge request tpo/core/arti!2241
| * Update to derive-deftly 0.14Ian Jackson2024-07-081-1/+1
| | | | | | | | | | This removes the deprecated syntaxes. Updating now will prevent us re-introducing the old syntaxes, which we updated in arti!2209.
* | Work around clippy::doc_lazy_continuation false positivesIan Jackson2024-07-081-4/+4
|/ | | | | | | See https://github.com/rust-lang/rust-clippy/issues/13001 I think it's OK to change this in our tree, nevertheless.
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Update to itertools 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p itertools