summaryrefslogtreecommitdiff
path: root/crates/arti
Commit message (Collapse)AuthorAgeFilesLines
...
| * Introduce PredictedPortsListBuilderIan Jackson2022-04-251-2/+5
| | | | | | | | | | | | This means that `NetworkConfig::initial_predicted_ports` is now like the other list-like things, returning `&mut list_builder` with the same `set()` and `append()` methods.
| * Introduce AuthorityListBuilder in NetworkConfigBuilderIan Jackson2022-04-251-3/+2
| | | | | | | | | | | | | | | | | | NetworkConfigBuilder needs to not contain any validated structs, so that its serde does not expose the validated details. AuthorityListBuilder is what ought to go here - and it contains Vec<AuthorityBuilder>, not Vec<Authority>. As a consequence, many places now deal with AuthorityBuilder, rather than Authority.
| * Introduce define_list_config_builder macroIan Jackson2022-04-251-46/+9
| | | | | | | | | | | | This replaces two almost-identical sets of structs and impls. More are on the way, as per https://gitlab.torproject.org/tpo/core/arti/-/issues/447
| * logging: Drop a pointless .within() callIan Jackson2022-04-251-2/+1
| | | | | | | | | | | | | | | | | | | | Since "logfiles: Introduce LogfileListConfigBuilder", this code is in LogfileListConfigBuilder::build(), which is called by derive_builder's generated LoggingConfig::build(), and which will add a file context itself due to the `sub_builder` feature. So this is otiose. And, we are about to replace this whole thing with macro_rules-generated code (which won't do this).
* | squash! Bump every crate's edition to 2021.Nick Mathewson2022-04-254-7/+0
| | | | | | | | | | Remove all `use` statements for `TryFrom` and `TryInto`. These are now redundant in Rust 2021.
* | Bump every crate's edition to 2021.Nick Mathewson2022-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | This is an automated change made with a perl one-liner and verified with grep -L and grep -l. Some warnings are introduced with this change; they will be removed in subsequent commits. See arti#208 for older discussion on this issue.
* | Add 'rust-version = "1.56"' to every Cargo.toml file.Nick Mathewson2022-04-251-0/+1
| | | | | | | | | | | | | | This change was made automatically with a perl one-liner, and confirmed with `grep -L`. The `rust-version` field itself was introduced in 1.56.0.
* | Reformat all not-yet-reformatted Cargo.toml files.Nick Mathewson2022-04-251-19/+19
|/ | | | | There are no semantic changes here; only formatting. This is in preparation for other changes (wrt MSRV and edition)
* arti: ArtiConfig: derive ArtiConfigBuilderIan Jackson2022-04-221-87/+13
| | | | Replace handwritten builder struct, accessors, and builder function.
* logfiles: Introduce LogfileListConfigBuilderIan Jackson2022-04-221-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | In https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/462#note_2797697 we decided not to do this. However, having looked again at the way the FallbackList works, I think there is a lot of value in making these two things (and anything else like them[1]) as similar as possible. [1] At least PreemptiveCircuitConfig.initial_predicted_ports and NetworkConfig.authorities need the same treatment, and perhaps also GuardUsage.restrictions (although there is no GuardRestrictionBuilder). In the irc discussion I imagined `LogfilesConfigBuilder` as opposed to `LogfileConfigBuilder` (differing only in the `s`) which would be bad, but we can use `List` instead. We do *not* need to abstract away the validated version of the config. Providing a type alias helps the derive_builder sub_builder DTRT without needing special overrides. I have split this commit so that we can drop it, if we conclude it's not wanted.
* logfiles: Adjust LoggingConfigBuilder::file and impl DeserializeIan Jackson2022-04-221-1/+54
| | | | | | | | | Change LoggingConfigBuilder to contain Vec<LogfileConfigBuilder>, not Option<Vec<LogfileConfig>>. That makes it sane to Deserialize. Replace LoggingConfigBuilder's file(Vec<>) setter with the methods discussed in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/462#note_2797697
* logfiles Rename LogfileConfig::file to filesIan Jackson2022-04-221-4/+4
| | | | | It's a plural, and that fact is going to be exposed via serde, if it isn't already.
* fallback list: Introduce and use FallbackListBuilderIan Jackson2022-04-221-3/+3
| | | | | | | | | Now the network fallbacks configuration wants to Deserialize a Vec<FallbackDirBuilder>, rather than validated Vec<FallbackDir>. Methods on FallbackListBuilder are as per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/462#note_2797697 mutatis mutandi for the fact that this struct has only fallbacks in it.
* Downgrade `rlimit` to 0.7.Nick Mathewson2022-04-061-1/+1
| | | | | | | | | | Upstream 0.8.2 has broken compilation with Rust 1.53; versions 0.8.{0,1} have been yanked. Possibly by the time the next arti version comes out, they'll have fixed this situation, or we'll have upgraded our MSRV. Upstream issue at https://github.com/Nugine/rlimit/issues/42 .
* Bump all arti*, tor* crates to 0.2.0Nick Mathewson2022-04-011-7/+7
| | | | | | | | Not all of these strictly need to be bumped to 0.2.0; many could go to 0.1.1 instead. But since everything at the tor-rtcompat and higher layers has had breaking API changes, it seems not so useful to distinguish. (It seems unlikely that anybody at this stage is depending on e.g. tor-protover but not arti-client.)
* Upgrade rlimit -> 0.8.0Nick Mathewson2022-04-011-1/+1
|
* Update README.md files using readmes scriptNick Mathewson2022-03-291-1/+9
|
* rename *_isolation_group to *_isolationtrinity-1686a2022-03-242-2/+2
|
* Move SystemConfig to arti::cfgIan Jackson2022-03-213-6/+39
| | | | Fixes #314, #418.
* Run rustfmt to tidy up importsIan Jackson2022-03-211-1/+4
|
* ApplicationConfig: abolish accessorIan Jackson2022-03-213-10/+3
|
* Move ApplicationConfig to arti crateIan Jackson2022-03-212-2/+26
| | | | Code motion and import fixups.
* socks: abolish config accessorsIan Jackson2022-03-212-19/+4
| | | | | Making these fields pub(crate) is quite reasonable and does away with the need for accessors.
* Move ProxyConfig to arti crateIan Jackson2022-03-212-2/+51
| | | | | | | We put this in cfg.rs, rather than (say) socks.rs, because it has config relating to both socks.rs and dns.rs. Code motion and import fixups.
* Tidy up filt_from_opt_strIan Jackson2022-03-211-4/+3
| | | | This was clumsy. Now it is brought together it can be simplified.
* Abolish logging filter option accessorsIan Jackson2022-03-211-19/+7
| | | | | | | This de-duplicates the code that was in those accessors, and is now in filt_from_opt_str. Code motion and direct field access.
* Abolish easy accessors for logging configIan Jackson2022-03-211-26/+6
| | | | | | There are no longer needed, because the code that uses this configuration now lives in the same module as the configuration itself.
* Move logging configuration from arti_config::options to arti::loggingIan Jackson2022-03-214-5/+132
| | | | Code motion and import fixups.
* Rename arti::trace module to arti::loggingIan Jackson2022-03-212-2/+2
| | | | | We are going to move LoggingConfig here. We should follow the already-public name IMO.
* Move ArtiConfig to new arti::cfg moduleIan Jackson2022-03-214-3/+277
| | | | Code motion and import fixups.
* Alternative API for set_isolation_group().Nick Mathewson2022-03-172-2/+2
| | | | | | | | | | | | Instead of requiring a `Box<dyn Isolation>`, it now takes either a `Box<dyn Isolation>`, or an arbitrary `T` that implements `Isolation`. This API still allows the user to pass in a `Box<dyn Isolation>` if that's what they have, but it doesn't require them to Box the isolation on their own. Part of #414.
* Merge branch 'test-isolation' into 'main'Nick Mathewson2022-03-173-110/+48
|\ | | | | | | | | new api for isolation See merge request tpo/core/arti!377
| * add isolation to dns requeststrinity-1686a2022-03-162-9/+35
| |
| * accept boxed isolation in StreamPref::set_isolation_grouptrinity-1686a2022-03-161-1/+1
| |
| * add tests on Isolation and fix conditional compilation issuestrinity-1686a2022-03-161-2/+2
| | | | | | | | | | | | it seems I added conditional compilation without noticing it?? and there was some errors when choosing a prefered runtime depending on feature flags
| * replace IsolationMap with new Isolation traittrinity-1686a2022-03-161-102/+14
| |
* | Fix typoDimitris Apostolou2022-03-161-1/+1
|/
* make run_dns_resolver public and fix typotrinity-1686a2022-03-151-3/+2
|
* fix typos and minor issuestrinity-1686a2022-03-142-15/+23
|
* actually add DNS supporttrinity-1686a2022-03-143-4/+88
|
* add skeleton for DNS handlingtrinity-1686a2022-03-142-8/+90
|
* add udp to runtimetrinity-1686a2022-03-143-10/+69
|
* arti library crate: Add another note about panickingIan Jackson2022-03-111-0/+4
|
* arti library crate: re-add clippy lintsIan Jackson2022-03-111-0/+33
| | | | | | | I ought to have c&p these. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/403#note_2786099
* arti library crate: Add note about panickingIan Jackson2022-03-111-0/+4
|
* arti: Make main module entrypoints pubIan Jackson2022-03-116-14/+14
| | | | | This does not constitute any kind of stable API promise. But it might allow people to use our arti client code in novel ways.
* arti: Provide some rubric docs.Ian Jackson2022-03-111-0/+8
|
* arti: Move all code from binary crate to library crateIan Jackson2022-03-112-261/+269
| | | | This is just code motion and the minimal fixups.
* Add config paths table in `arti` docsLennart Kloock2022-03-042-5/+16
|
* Merge branch 'clippy-allow-arc-clone' into 'main'Nick Mathewson2022-03-011-1/+0
|\ | | | | | | | | Disable clippy::clone_on_ref_ptr See merge request tpo/core/arti!352