summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Split TorClientConfig out of ArtiConfig, and Resolvable traitIan Jackson2022-05-248-51/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets rid of `#[serde(flatten)]` which prevents serde_ignored (and other kinds of introspection) from working properly. The price is now that the toplevel has to deal with two configuration objects. The Resolvable trait is overkill right now, but is going to do More Things in a moment. In particular, we need the impl on tuples, so that the whole config can be processed in one go.
| * | | | tor-config: Introduce Builder trait and ConfigReolveErrorIan Jackson2022-05-242-5/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to need this for some generic code which is going to appear shortly. Having it produced by impl_standard_builder seems best. But that does mean being able to disable it, so extra stuff in the macro. Nothing uses this trait yet. ConfigResolveError is not used now either, but will be in a moment.
| * | | | arti tests: Introduce bld_tor variableIan Jackson2022-05-241-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to reorganise ArtiConfig to not contain a TorClientConfig. This test case's calls to bld.tor() will all need to change. Do this in advance to make that future commit more readable.
| * | | | tor-config: Add a lint allowIan Jackson2022-05-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't understand why this isn't tripping all the time. Maybe because this is in a macro. Anyway, I am going to add a new invocation of this macro from within a test where, empirically, it trips.
* | | | | Merge branch 'no-disable-arti-permission-checks' into 'main'Nick Mathewson2022-05-252-1/+12
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | ci: don't disable arti permission checks, fix resulting issues See merge request tpo/core/arti!530
| * | | | fs-mistrust: allow symlinks to have any permissionsAlex Xu (Hello71)2022-05-252-1/+12
| | | | |
* | | | | Merge branch 'no_nochange' into 'main'Ian Jackson2022-05-253-72/+25
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | DirMgr:: Remove Error::NoChange as redundant. Closes #484 See merge request tpo/core/arti!532
| * | | | DirMgr:: Remove Error::NoChange as redundant.Nick Mathewson2022-05-253-72/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the relevant functions now report changed/not-changed status via a boolean out-parameter (see !527), there's no reason to have a separate NoChanged error case. Closes #484.
* | | | | Merge branch 'bug475' into 'main'Ian Jackson2022-05-251-1/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConfigurationSources: Allow config files to be world-readable. Closes #475 See merge request tpo/core/arti!528
| * | | | | ConfigurationSources: Allow config files to be world-readable.Nick Mathewson2022-05-241-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #475.
* | | | | | Merge branch 'socks-errors' into 'main'Nick Mathewson2022-05-251-48/+67
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | reply socks error on more codepath Closes #258 See merge request tpo/core/arti!531
| * | | | | reply socks error on more codepathtrinity-1686a2022-05-251-48/+67
| | |_|/ / | |/| | |
* / | | | Typo fixes (automated with "typos").Nick Mathewson2022-05-241-4/+4
|/ / / /
* | | | Merge branch 'isolation-example' into 'main'Nick Mathewson2022-05-241-0/+198
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add example for Isolation Closes #414 See merge request tpo/core/arti!524
| * | | | mention isolation is an advanced topic and most usage don't require ↵trinity-1686a2022-05-241-0/+3
| | | | | | | | | | | | | | | | | | | | implementing the trait
| * | | | add example for Isolationtrinity-1686a2022-05-231-0/+195
| | | | |
* | | | | Merge branch 'bug482' into 'main'eta2022-05-242-29/+133
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DirMgr: Stop load-from-cache process when there is no change. Closes #482 See merge request tpo/core/arti!527
| * | | | | DirMgr: Stop load-from-cache process when there is no change.Nick Mathewson2022-05-242-29/+133
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously in !511 I had introduced a bug where, if there was an error more serious than "no change", that error would keep us from noticing that we had no change, and we'd loop until the safety counter ran out. Then we'd panic. This commit fixes the bug by reintroducing the `changed` boolean -- this time as an outparam for the add_from_* methods. Fixes #482.
* | | / / Allow use of RetainMut, since we do not require Rust 1.61 yet.Nick Mathewson2022-05-241-0/+2
| |_|/ / |/| | |
* | | | Use serde attrs instead of manual implsNick Mathewson2022-05-242-28/+14
| | | |
* | | | Apply fs-mistrust to logfile directories.Nick Mathewson2022-05-244-7/+46
| | | |
* | | | Make fs-mistrust configurable from the top level.Nick Mathewson2022-05-247-56/+120
| | | | | | | | | | | | | | | | | | | | | | | | This change requires a little refactoring of TorClientBuilder: now, instead of enabling or disabling mistrust, it enables or disables the decision to _override_ the mistrust in the config.
* | | | Write custom serde impls for Trusted{User,Group}Nick Mathewson2022-05-243-11/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We support all of the following (in TOML notation): ``` user = "rose" # by name user = 413 # by ID user = false # no user user = ":current" # A 'special' user. user = { name: "rose" } user = { id: 413 } user = { special: ":none" } user = { special: ":current" } ```
* | | | Add serde derives for MistrustBuilder.Nick Mathewson2022-05-243-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | The Group and User (de)serialization is pretty ugly, and I can't vouch for the correcness of MistrustBuilder. I will seek feedback before I proceed.
* | | | fs-mistrust: Add Group and User types.Nick Mathewson2022-05-244-24/+196
| | | | | | | | | | | | | | | | | | | | This will help make the actual configuration more serializable, I hope.
* | | | fs-mistrust: make Mistrust have a corresponding Builder type.Nick Mathewson2022-05-2413-157/+221
| | | | | | | | | | | | | | | | | | | | This is an approximately minimal revision to get Builder in place; subsequent commits will clean up the API.
* | | | fs-mistrust: rename fieldsNick Mathewson2022-05-242-15/+15
| |/ / |/| | | | | | | | | | | This renaming will make things slightly simpler for declaring a builder.
* | | Merge branch 'upgrades-20220523' into 'main'Ian Jackson2022-05-242-2/+2
|\ \ \ | | | | | | | | | | | | | | | | Update to newer sanitize-filename and tinystr. See merge request tpo/core/arti!523
| * | | Update to newer sanitize-filename and tinystr.Nick Mathewson2022-05-232-2/+2
| |/ /
* | | Resolve the new `derive_partial_eq_without_eq` lint.Nick Mathewson2022-05-2312-14/+14
| | | | | | | | | | | | It's a little overzealous sometimes, but it's mostly to the good.
* | | Suppress clippy warnings in tor-basic-utils.Nick Mathewson2022-05-232-0/+2
|/ / | | | | | | These are warnings that we've decided it's okay to suppress elsewhere.
* | Merge branch 'remove_dbgs' into 'main'Nick Mathewson2022-05-232-5/+3
|\ \ | | | | | | | | | | | | Remove dbg!()s in tor-config, and fix nightly CI See merge request tpo/core/arti!516
| * | Add a couple of "pub use" to make nightly rustdoc pass.Nick Mathewson2022-05-201-0/+3
| | |
| * | Remove dbg!()s in tor-configNick Mathewson2022-05-201-5/+0
| | | | | | | | | | | | This should satisfy our CI and turn it green again.
* | | Merge branch 'update-min-async-compression' into 'main'eta2022-05-231-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | async-compression minimum version 0.3.5 -> 0.3.14 Closes #473 See merge request tpo/core/arti!521
| * | | async-compression minimum version 0.3.5 -> 0.3.14Jim Newsome2022-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 0.3.14 is the first released version to include https://github.com/Nemo157/async-compression/commit/e7246738762de34bbb820662c3923f8f2610ac95, which fixes https://gitlab.torproject.org/tpo/core/arti/-/issues/473
* | | | add unit tests for arti_client::StreamPrefsmichael mccune2022-05-231-0/+77
|/ / / | | | | | | | | | | | | | | | this change adds unit tests for the public methods of StreamPrefs. although these are mostly "setter" style functions, the tests confirm the basic expectations and operation.
* | | prepare_send_from: clippy: Replace some or_else with orIan Jackson2022-05-231-2/+2
| | |
* | | prepare_send_from: clippy: Have dprintln explicitly return ()Ian Jackson2022-05-231-1/+1
| | |
* | | prepare_send_from: clippy: Avoid a lintIan Jackson2022-05-231-2/+1
| | | | | | | | | | | | I think this is worse code, but it's not *significantly* worse.
* | | prepare_send_from: clippy: Add missing docsIan Jackson2022-05-231-11/+18
| | | | | | | | | | | | I intend to reintroduce this in its own MR.
* | | prepare_send_from: clippy: Replace two unwrapsIan Jackson2022-05-231-2/+6
| | |
* | | prepare_send_from: Break out get_output! macroIan Jackson2022-05-231-2/+11
| | | | | | | | | | | | So we can change unwrap to expect, which makes this too long to repeat.
* | | prepare_send_from: docs and comments improvementsIan Jackson2022-05-231-13/+115
| | | | | | | | | | | | Apropos review.
* | | prepare_send_from: Add testsIan Jackson2022-05-231-0/+122
| | | | | | | | | | | | | | | | | | When I added these tests, they didn't find any bugs in my own implementation, but I did find a bug in futures::future::unfold. See the in-code comment.
* | | channel: Provide and use Sink::prepare_send_fromIan Jackson2022-05-234-75/+322
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a general-purpose implementation of the ad-hoc approach currently taken in (eg) crates/tor-proto/src/channel/reactor.rs, with an API intended to defned against the more obvious mistakes. This allows us to separate the two concerns: the channel reactor can focus on handling channel cells and control messages and is over 2.5x shorter. The complexity of the manual sink implementation, and the machinery needed to avoid having to suspend while holding an item, are dealt with separately. That separate implemenation now has proper documentation. (Tests are in the nest commit to avoid this one being even more unwieldy.) We use `extend` to define this as an extension trait. A competitor is `ext` but in my personal projects I have found `extend` slightly better.
* | Merge branch 'cert_dl_recovery_v3' into 'main'eta2022-05-196-246/+631
|\ \ | | | | | | | | | | | | | | | | | | DirMgr: Revise error handling to better tolerate reset-able failures Closes #412 and #439 See merge request tpo/core/arti!511
| * | Simplify advance and reset functions with mem::replace.Nick Mathewson2022-05-191-8/+4
| | |
| * | Explain why we call update_status unconditionally.Nick Mathewson2022-05-191-0/+3
| | |
| * | Remove BootstrapAction::ImpossibleNick Mathewson2022-05-193-7/+4
| | | | | | | | | | | | It does nothing that Fatal does not. Suggested by @eta in review.