| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This will ensure that the TorClient takes its file locks immediately
on construction.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This will let us be more confident in the inertness of a
not-bootstrapping TorClient, _and_ make it easier to reconfigure
things before the client is started.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Now that we have a type called "inner", and will soon have a
function to create it, we really don't want to retain this name.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We want this look to cover the whole function, to avoid weird
duplicate behavior while creating our bridge desc manager.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We'll use this to distinguish "not running" from "running",
in order to make it easier to be sure that non-bootstrapping clients
will definitely not try to connect to the network.
|
| | | | | | | |
|
| |\ \ \ \ \ \
| |_|/ / / /
|/| | | | |
| | | | | |
| | | | | | |
Implement configuration backend logic for RPC
See merge request tpo/core/arti!4001
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | | |
Co-authored-by: gabi-250 <[email protected]>
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Some of the tests used derive(Builder), which is not current
practice for our configuration.
Additionally, they didn't implement the requisite ConfigBuilder
logic to pass with the other changes in this branch.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
I've left the options here as booleans, but moved them into a
struct. (IMO, booleans are at their riskiest when they are passed
as function arguments, and much less risky when they are used as
struct fields.)
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This functionality exposes the part of the configuration tree that
was actually used, along with any defaulted values. RPC will want
this.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This new method modifies a builder by replacing any unset values
that have a default with that default. We're using this method
so that we can re-serialize a builder into a `ConfigurationTree`
with all of its default values included.
In all cases, `b.apply_defaults()?; b.build()` should produce
the same output as `b.build()`.
The interesting parts of this commit are in tor_config::load
and tor_config::derive. The rest of this commit just adds
`apply_defaults` to other builders that _aren't_ made with
`derive_deftly(TorConfig)`.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We need this pattern in a lot of places; we might as well just
define it once.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
This isn't strictly necessary, but it helps for consistency.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This affects the automatic builder code made by our
derive_deftly macro. It is only relevant (for now)
in the case of the `NonZero<>` types and their special handling.
Previously, when a builder contained Option<U>,
and we wanted to generate a configuration holding T,
we would _first_ apply a transformation from Option<U> to Option<T>
and _second_ unwrap the result or apply a default.
Now, we _first_ convert from Option<U> to U by applying a default,
and only _then_ perform any necessary conversion from U and T.
This is only relevant in the case where U and T are different.
It simplifies writing the defaults for `NonZero` options,
and will significantly simplify the logic for setting builder defaults.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
It previously referred to a function that didn't exist.
|
| | |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
It looks like we renamed this macro, but didn't rename it in its
documentation.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add Bandwidth support to Router Descriptors
See merge request tpo/core/arti!4005
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit adds the bandwidth field to the RouterDesc struct as it is
found within the spec. The legacy parser will not support it, hence why
we do default values there.
|
| | | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | | |
This commit adds the bandwidth struct for router descriptors which is
present in the `bandwidth` item.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fix two unused warnings
See merge request tpo/core/arti!4019
|
| | | | | | | |
|
| | | | | | | |
|
| |\ \ \ \ \ \
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | | |
tor-netdoc: Implement encoding for referenced doc digest in rs entries
See merge request tpo/core/arti!3989
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is not tested yet. It will be tested when we add round-trip
tests for votes.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
This doesn't parse the keyword, only the value.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* Rename it so that it doesn't mention parse2, because we're going to
want to encode too.
* Remove the indirection: rename the one in md.rs to be the name
that's used in `with = `. (Previously, things were more complicated
so the extra layer of indirection was helpful.)
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
FixedB64 is the right type for these, when they are present.
This abolishes some ad-hoc boilerplate. Sadly we still need a bit of
that for Reasons.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, this was't possible because derive-deftly wanted a string.
But now it can take a type, and types can contain macro calls inside
their generics etc.
This makes the code much more local and direct.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is router *status* not router *descriptor*.
|
| | | | | | | |
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
proto: Add tests for DESTROY and TRUNCATE handling
See merge request tpo/core/arti!4008
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We decided the reactor is the wrong place to handle this.
See discussion in #2490
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This adds an extra assertion that ensures the relay reactor does in fact
send an EXTENDED2 on its towards-the-client channel after receiving the
CREATED2 response from the fake hop.
This check is nice to have in general, but the main reason I'm doing
this now is because for the DESTROY tests I'm about to add, I need the
inbound MPSC queue (towards the client) drained of these handshake
messages in order to check that the "next" cell we've sent is a destroy.
I could've added some custom code to drain it just for the purposes of
that test, but I think it's better to have `do_create2_handshake()` take
care of it.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The new name is (hopefully) a bit more descriptive.
I'm planning on extending this function soon to support checking if a
DESTROY has been sent on the outbound channel too, so I'm tweaking the
docs a bit in preparation for that.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
I'll soon need this for a DESTROY test.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This changes a debug log to have the same format as the corresponding
DESTROY-related log from the forward reactor.
Part of #2490
|
| | | | | | | | |
|