summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | bridge config parsing tests: Show expected error message in asssrtIan Jackson2022-11-221-2/+3
| | | | | |
| * | | | | bridge config parsing: Parse transport as TransportId (fmt)Ian Jackson2022-11-221-17/+15
| | | | | |
| * | | | | bridge config parsing: Parse transport as TransportIdIan Jackson2022-11-221-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #653
| * | | | | bridge config parsing: Move unsupported blockIan Jackson2022-11-221-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | This will make the next commit textually smaller.
| * | | | | TransportId: Parse "bridge" as builtin transportIan Jackson2022-11-221-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow transport="bridge" in bridge configurations, etc. Doing it at this layer means it will be recognised everywhere.
| * | | | | TransportId: Provide new_builtin and new_pluggableIan Jackson2022-11-221-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think normal Rustic practice is to provide a real constructor as well as just `Default`.
| * | | | | TransportId: Provide name accessor and deconstructorIan Jackson2022-11-221-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are maintaining the notion that at some point this thing might grow additional variants.
| * | | | | TransportId: Document and change string repr for builtinIan Jackson2022-11-221-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change the Display of builtin to "-" * Parse "" and "-" as builtin, as well as "<none>" * Document this
| * | | | | TransportId: Add test case for builtin Display reprIan Jackson2022-11-221-0/+2
| | | | | |
| * | | | | bridge non-support: Add doc notes to GuardMgrConfig::bridges_enabledIan Jackson2022-11-211-0/+7
| | | | | |
| * | | | | bridge non-support: Test that we reject configsIan Jackson2022-11-211-4/+19
| | | | | |
| * | | | | bridge non-support: De-cfg the primary bridge config fieldsIan Jackson2022-11-212-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now parse the `bridges.enabled` BoolOrAuto, and the `bridges.bridges` list. The `bridges.bridges` list is Vec<()> in the builder, and Vec<Void> in the built config. Ie, it is simply a count, and vanishes in the built config. But this count triggers us to try to call build(), to try to parse bridges, and to try to set and honour the enablement boolean. The result is that the type system now ensures that if bridges are disabled, but specified (either by listing them in the config, or writing `enabled=true`), we inevitably try to insist that we have a non-empty Vec<Void>, which is of course impossible. There will be a test case too for those who think this too abstract a way to guarantee this property :-).
| * | | | | bridge non-support: Provide a better BridgeConfigBuilderIan Jackson2022-11-212-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This type now does all the things people expect of it: you can (try to) deserialize it, parse it from a string, and call build on it.
| * | | | | bridge config: Feature-gate the error variantsIan Jackson2022-11-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This leaves this enum empty of actual errors, when bridge-client is disabled. We're going to add the not supported variant in a moment.
| * | | | | bridge config: Move error to its own fileIan Jackson2022-11-212-104/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dummy module is going to need an error type just like this but with only the disabled variant. To avoid that dummy enum getting out of step with the nontrivial one, we're going to make them the same. So as a first step, break this out into its own file.
| * | | | | bridge non-support: Move dummy bridge module into own fileIan Jackson2022-11-212-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bit more stuff is going to appear here, so it's getting to be rather much for an inline module.
| * | | | | arti cfg test: Break out expect_err_contains functionIan Jackson2022-11-211-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maybe this will want to be in tor-error or something but put it here for now.
| * | | | | bridge non-support: Disable the test for nowIan Jackson2022-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test will start to fail if you compile without bridge support, because we'll start rejecting the test configurations with bridges specified. We'll add a proper test for this later.
| * | | | | tor-config: introduce ConfigBuildError::UnsupportedIan Jackson2022-11-212-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | And use it in bridge configuration parsing.
| * | | | | tor-config: ConfigBuildError::within: Introduce add_prefixIan Jackson2022-11-211-3/+4
| | | | | |
| * | | | | bridge config builder: Introduce error constructor helpers (fmt noise)Ian Jackson2022-11-211-12/+12
| | | | | |
| * | | | | bridge config builder: Introduce error constructor helpersIan Jackson2022-11-211-40/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/874/diffs?commit_id=12d13428d8fcc68b7b0f231bac9fc130b3eeb18b#d53209cbcd12771c549f3a130379ecb65dd60145_100_193
| * | | | | bridge config builder: Document one id of each type restrictionIan Jackson2022-11-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/874/diffs?commit_id=620cc90f6dcdad20f49a001a9e04d191a323e904#d53209cbcd12771c549f3a130379ecb65dd60145_100_124
| * | | | | bridge config builder: Document PT one address restrictionIan Jackson2022-11-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/874/diffs?commit_id=620cc90f6dcdad20f49a001a9e04d191a323e904#d53209cbcd12771c549f3a130379ecb65dd60145_100_121
| * | | | | Make the bridge list in the builder be a list of BridgeConfigBuilderIan Jackson2022-11-212-33/+30
| | | | | | | | | | | | | | | | | | | | | | | | By changing MultilineListBuilder.
| * | | | | BridgeConfigBuilder: Allow (de)ser to/from bridge linesIan Jackson2022-11-211-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That the *de*serialisation works as expected will be tested properly in just a moment, because when we plumb this all the way through, it will be what parses the bridge lines in the example config file.
| * | | | | tor-basic-utils: Provide helper for serde flexible parsingIan Jackson2022-11-213-0/+92
| | | | | |
| * | | | | BridgeConfigBuilder: Implement FromStrIan Jackson2022-11-211-1/+46
| | | | | |
| * | | | | BridgeConfigBuilder: Introduce build() functionIan Jackson2022-11-212-8/+256
| | | | | | | | | | | | | | | | | | | | | | | | And test cases for it, and its errors.
| * | | | | BridgeConfigBuilder: Introduce the struct with the dictionary reprIan Jackson2022-11-214-6/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This struct is going to be the principal "dictionary-style" serde representation for a bridge, and the builder, making this all in keeping with our usual approach. In this commit: * Introduce the struct (defining the serialisation) * Provide the setters (defining the Rust API) * Add success test cases (not all of the data in which is used yet)
| * | | | | tor-basic-utils: list_builder: Introduce DirectDefaultEmptyListBuilderAccessorsIan Jackson2022-11-211-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait can have this ludicrously long name because no-one needs to import it.
| * | | | | BridgeAddr rename: update tor_guardmgr::bridge::configIan Jackson2022-11-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is where my motivation is and I'm working on this code now, so do this renaming cleanup now.
| * | | | | BridgeAddr rename from PtTargetAddr: Update in tor-linkspecIan Jackson2022-11-213-29/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And the error too. We need this for the API for BridgeConfigBuilder, where the user can specify any kind of target "address", even a hostname. It's already non-conditional, it's just that the name is too limiting. In this commit: * Change in tor-linkspec * Export transitional aliases * Add TODOs to remove the transitional aliases
| * | | | | tor-linkspec: Provide deconstructors for PtTargetSettings and PtTargetIan Jackson2022-11-212-0/+11
| | |/ / / | |/| | |
| * | | | cfg compilation: Add two allowsIan Jackson2022-11-182-0/+2
| | | | |
| * | | | Merge branch 'fix_nightly_20221118' into 'main'Ian Jackson2022-11-1812-20/+21
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | Fix warnings and breakage in nightly (2022-11-18 edition) See merge request tpo/core/arti!872
| | * | | Fix a couple of rustdoc issues.Nick Mathewson2022-11-182-3/+4
| | | | | | | | | | | | | | | | | | | | These slipped in while nightly was broken.
| | * | | Fix a bunch of "needless borrow" warnings on nightlyNick Mathewson2022-11-1810-17/+17
| | | |/ | | |/| | | | | | | | | | | | | It looks like, despite a few false starts, they've got this warning right; there weren't any false positives.
| * | | Fix a missing import in tests.Nick Mathewson2022-11-181-1/+1
| | | | | | | | | | | | | | | | I'm not sure why the CI didn't reject this the first time around.
| * | | Merge branch 'refactor_into_ownedchantarget' into 'main'Nick Mathewson2022-11-184-12/+24
| |\ \ \ | | | | | | | | | | | | | | | | | | | | CircMgr: Refactor DirSpecificTarget constructor See merge request tpo/core/arti!866
| | * | | CircMgr: Refactor DirSpecificTarget constructorNick Mathewson2022-11-184-12/+24
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces the `impl From<&T> for OwnedChanTarget where T:ChanTarget` with a new `IntoOwnedChanTarget` trait. This lets us be explicit that we're constructing an owned object, and not just converting something. No semver change needed, since these APIs haven't been released. ----------- (new description)
| * | | Merge branch 'mark-bridges-not-experimental' into 'main'Nick Mathewson2022-11-1815-43/+103
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark bridge and PT-related APIs as non-experimental. Closes #643 See merge request tpo/core/arti!865
| | * | | circmgr: make some imports conditionalNick Mathewson2022-11-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This resolves an "unused import" warning when bridges are not enabled.
| | * | | arti-client: make bridge-client depend on dirmgr/bridge-clientNick Mathewson2022-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This resolves some errors when building with `bridge-client` but not with `--all-features`.
| | * | | arti: Mark bridge and pt support non-experimental, and on-by-defaultNick Mathewson2022-11-182-4/+14
| | | | |
| | * | | arti: Split long lines in Cargo.tomlNick Mathewson2022-11-181-1/+10
| | | | | | | | | | | | | | | | | | | | This will make the next commit easier to review.
| | * | | arti-client: Mark "bridge-client" and "pt-client" as non-experimentalNick Mathewson2022-11-182-4/+4
| | | | |
| | * | | arti-client: split long lines in Cargo.tomlNick Mathewson2022-11-181-2/+13
| | | | | | | | | | | | | | | | | | | | Doing this separately to make the next commit easier to read.
| | * | | dirmgr: make "bridge-client" non-experimental.Nick Mathewson2022-11-182-12/+16
| | | | |
| | * | | guardmgr: Make bridge-client and pt-client non-experimentalNick Mathewson2022-11-182-2/+14
| | | | |