summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * tor-config: Introduce PaddingLevelIan Jackson2022-08-163-0/+115
| | | | | | | | This will be used for controlling channel padding, for now.
| * tor-config: Introduce ReconfigureError::BugIan Jackson2022-08-161-0/+4
| | | | | | | | Reconfigurations might fail due to internal errors.
| * channel: Provide somewhere for the frontend's mutable stateIan Jackson2022-08-161-0/+24
| | | | | | | | | | Right now this is just furniture. We're going to put channel padding control state here.
| * Provide ChannelUsage and plumb it all the way downIan Jackson2022-08-169-29/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | Channel padding depends on what the channel is being used for. We therefore need to let the channel code know this information. The implementation of the per-channel padding control logic will be in the new note_usage function, which for now is simply a stub. A future commit will introduce a `PaddingControlState` which lives in the channel frontend; consult the doc comment for that type to see why the plumbing through the channel manager terminates in the channel frontend.
| * chanmgr: Introduce get_or_launch_internalIan Jackson2022-08-161-0/+10
| | | | | | | | This is going to be useful in a moment.
| * channel reparameterize: Change error typeIan Jackson2022-08-164-15/+9
| | | | | | | | This is going to be able to fail in other ways too, sadly.
| * dormancy: Plumb through to chanmgr reconfigure_generalIan Jackson2022-08-165-19/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The chanmgr remembers the last dormancy state it was told. We invent a chanmgr-specific Dormancy which the arti-client code knows how to convert from the richer top-level dormant status. This avoids having to have everyone know all the variants of the top-level state. To call reconfigure_general, we must also obtain and plumb through a netdir. Right now we must return an internal error if there is in fact no netdir, because reconfigure_general does not yet cope with a missing netdir. Nothing actually *uses* the dormancy yet.
| * dormancy: tor-client: Break initial dormancy out into a variableIan Jackson2022-08-161-1/+2
| | | | | | | | | | | | We're going to need to reuse this, so we can plumb the dormancy to more places. Breaking it out avoids having repeat the initial dormancy value in two places.
| * chanmgr: reconfigure_general: Rename fn and change typesIan Jackson2022-08-163-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is going to become the code for controlling channels, in general. (Including padding control.) Right now it doesn't do most of the things. In this commit: * Change the prototype and the name now. * Pass `()` for the dormancy and config, adding TODOs. * Provide update_netdir method on AbstractChanMgr, and call that, rather than having the ChanMgr go directly into the channel. (That will enable us to test that `update_netdir` method with test cases that don't have a complete ChanMgr.)
| * channel params: ChannelsParamssUpdates: provide combine()Ian Jackson2022-08-161-0/+13
| | | | | | | | | | We're going to need this because the frontend is going to need to defer some channel padding parameters updates.
| * channel params: Add a missing comma.Ian Jackson2022-08-161-1/+1
| | | | | | | | | | | | | | Unfortunately, because we don't have derive-adhoc here yet, rustfmt didn't get to notice that this comma was needed. We are going to add field(s), so add the comma now.
| * channel params: Rename initial_update (from total_update)Ian Jackson2022-08-162-4/+4
| | | | | | | | The semantics of this are going to become a bit more subtle.
| * tor-proto: padding::Parameters: Provide all_zeroesIan Jackson2022-08-161-0/+10
| | | | | | | | | | This exists so that we handle this case specially, as we will need to, and so that we can represent disablement in a Parameters.
| * tor-proto: padding::Parameters::padding_negotiate_cellIan Jackson2022-08-161-1/+17
| | | | | | | | | | The channel manager is going to use this as part of constructing the right cell for padding neogotiattion.
| * tor-proto: padding::Parameters: Provide default_reduced constructorIan Jackson2022-08-161-0/+12
| | | | | | | | We're going to want this so that we can do reduced padding.
| * chancell: PaddingNegotiate: Provide start_default and a Default implIan Jackson2022-08-161-0/+20
| | | | | | | | | | As proposed in https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/77
| * chancell: Introduce PaddingNegotiateCmdIan Jackson2022-08-161-5/+17
| | | | | | | | | | This gets rid of some random hardcoded literals. We're going to want to reuse this, too.
| * chancell: PaddingNegotiate: Provide two constructors, not oneIan Jackson2022-08-162-8/+21
| | | | | | | | | | | | | | | | We don't really want the caller to pass ignored timeout parameters. And this makes more semantic sense. The stop constructor uses zero, which is what C Tor does. See https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/76
| * chancell: PaddingNegotiate: Make EqIan Jackson2022-08-161-2/+2
| | | | | | | | | | | | | | | | This will be convenient for managing when to send these negotiation messages. While we're here, edit the comment to explain how this is (going to be) used.
| * channel padding: Add doc commentary with the channel padding planIan Jackson2022-08-162-0/+27
| | | | | | | | | | | | | | Much of this does not exist yet. It will do by the end of this branch. Expand a doc note for ChannelsParamsUpdates too.
| * chanmgr: tests: Introduce new_test_channel_mapIan Jackson2022-08-161-6/+11
| | | | | | | | This is going to change. Centralise it first.
| * chanmgr: tests: Introsuce new_test_abstract_chanmgrIan Jackson2022-08-161-8/+9
| | | | | | | | This is going to change. Centralise it first.
| * channel: Centralise Channel::send_controlIan Jackson2022-08-161-14/+16
| | | | | | | | | | | | Replaces 4 open-coded call sites. I am going to add one more.
| * tor-proto: padding::Parameters: use impl_standard_builderIan Jackson2022-08-162-7/+4
| | | | | | | | | | | | | | This is more standard. It also provides the ::build() method. This isn't a config type, and build failures ought not to happen, so we use Bug for the error.
| * arti-client: TorClient constructor: add a blank lineIan Jackson2022-08-161-0/+1
| | | | | | | | | | The rustfmt-mandated different formatting of these two very similar blocks is bad enough, without them being smooshed together.
* | Merge branch 'transient_circmgr_errors' into 'main'Nick Mathewson2022-08-162-15/+75
|\ \ | |/ |/| | | | | | | | | Mark some circuit-building errors as "transient". Closes #517 See merge request tpo/core/arti!676
| * Additionally, mark the LostUsablityRace error as a "reset".Nick Mathewson2022-08-161-1/+5
| |
| * Mark some circuit-building errors as "transient".Nick Mathewson2022-08-162-15/+71
| | | | | | | | | | | | | | | | | | | | | | | | A "transient" error is one that does not indicate a true failure, but rather an _expected_ need to retry. When we hit one of these, we do not count it against the total number of permitted failures. (We do impose a higher limit on "real failures plus transient failures", though, to prevent infinite loops in the event of a programming error. Closes #517.
* | Clarify `REASON_DONE`Emptycup2022-08-161-1/+1
| |
* | Merge branch 'hardening' into 'main'Nick Mathewson2022-08-156-3/+75
|\ \ | | | | | | | | | | | | | | | | | | arti: Add support for process hardening Closes #364 See merge request tpo/core/arti!672
| * | arti: Add support for process hardeningNick Mathewson2022-08-156-3/+75
| |/ | | | | | | | | | | | | | | | | | | | | | | | | This is a compile-time feature with an associated configuration flag, both enabled by default. When it's turned on, hardening prevents the arti process from dumping core or being attached to by low-privileged processes. (This is a defense-in-depth measure, not an absolute way to prevent attacks. For more information, see [`secmem_proc`](https://docs.rs/secmem-proc/0.1.1/secmem_proc/).) Closes #364.
* | Merge branch 'nightly_fix_rtt' into 'main'eta2022-08-151-1/+1
|\ \ | |/ |/| | | | | Fix nightly CI: allow print_stderr in rtt tests. See merge request tpo/core/arti!673
| * Fix nightly CI: allow print_stderr in rtt tests.Nick Mathewson2022-08-111-1/+1
| |
* | Add a semver note for TcpStream send conversion.Nick Mathewson2022-08-151-0/+1
| |
* | tor-rtcompat: Require that TcpStream be SendIan Jackson2022-08-152-2/+2
|/ | | | The lack of this seems to have been an oversight.
* Merge branch 'less_arti_surface' into 'main'Nick Mathewson2022-08-1110-20/+115
|\ | | | | | | | | | | | | Reduce the arti crate's API surface; improve semver documentation. Closes #522, #530, and #532 See merge request tpo/core/arti!664
| * Add a few dire warnings about main; make main_main experimental.Nick Mathewson2022-08-111-2/+31
| |
| * Document more explicitly what "voiding a semver warranty" entailsNick Mathewson2022-08-112-2/+10
| | | | | | | | Closes #522.
| * arti: `main_main` takes command-line arguments does not call exit()Nick Mathewson2022-08-112-3/+19
| |
| * arti: Move most public APIs behind `experimental-api`.Nick Mathewson2022-08-119-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remaining unconditionally public APIs are those related to our configuration objects, and the main_main() API. The rationale for making main_main() public is to have an actual entry point. The rationale for making the config APIs public is: 1. We really do intend for others to be able to read our configuration files using this API. 2. The structure of our configuration files is already part of our interface. Closes #530.
| * arti: Add a feature flag for dns-proxy.Nick Mathewson2022-08-112-3/+14
| | | | | | | | | | | | | | It remains on-by-default, so users shouldn't notice a difference, but it may help when we want to save a few bytes of binary size. Closes #532
* | tor-congestion: implement the RTT estimation algorithm from prop#324eta2022-08-116-0/+519
| | | | | | | | | | | | | | | | | | | | | | This commit implements the round-trip-time estimation algorithm from Tor proposal 324, validating the implementation against the test vectors found in C tor. (Note that at the time of writing, the new test vectors may not be committed to C tor yet, but they will be soon.) This also adds the necessary consensus parameters to `NetParameters`. Some of them have been renamed in order to (hopefully) make them more understandable.
* | tor-proto: Add a comment about the tor-proto layer.Nick Mathewson2022-08-101-0/+18
| | | | | | | | | | | | | | | | | | We want to clarify that the tor-proto crate should only know _how_ its objects behave, not _why they behave that way_. (In other words, we can have a "padding strategy" setting on a channel, but not a "general usage" setting.) Closes #531.
* | Clarify that tor-proto _does_ create timers.Nick Mathewson2022-08-101-4/+2
| |
* | Merge branch 'main' into 'linkspec_refactor_v3'Nick Mathewson2022-08-1034-108/+448
|\ \ | | | | | | | | | # Conflicts: # crates/tor-netdir/semver.md
| * | Decrease the lifetimes for storing descriptors.Nick Mathewson2022-08-091-6/+29
| | | | | | | | | | | | | | | | | | | | | These values were chosen experimentally, based on those from Tor, to save disk space without wasting much bandwidth. Closes #527.
| * | Merge branch 'fix-nightly-ci' into 'main'Nick Mathewson2022-08-091-1/+1
| |\ \ | | | | | | | | | | | | | | | | fix nighly ci See merge request tpo/core/arti!668
| | * | fix nighly citrinity-1686a2022-08-081-1/+1
| | |/
| * | Merge branch 'fix-android-runtime' into 'main'eta2022-08-093-12/+45
| |\ \ | | | | | | | | | | | | | | | | fix fs-misstrust on android See merge request tpo/core/arti!667
| | * | fix fs-misstrust on androidtrinity-1686a2022-08-083-12/+45
| | |/ | | | | | | | | | | | | | | | it would fail to link at runtime due to missing getgrnam_r in bionic and then it would fail again because some directory is group writeable