| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\
| |
| |
| |
| | |
arti-relay: Advertise config fields are now lists
See merge request tpo/core/arti!3538
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Example:
```toml
[relay.advertise]
ipv4 = []
ipv6 = ["[10::]:10"]
```
```text
Error: Failed to resolve configuration
[...]
The list is empty for key "default.relay.advertise.ipv4" in [...]
```
|
| | | |
|
| | |
| |
| |
| | |
This reverts commit c7c8eb5a03439ce31319389183e64cb0db539fc9.
|
| | |
| |
| |
| |
| | |
(We could tighten this up even more by inlining some of the default
values.)
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This template is meant to replace most of our use of derive_builder
for configuration objects. Where possible and reasonable, it
delegates to existing macros, and automatically infers what special
patterns we use for individual types. In other cases, it uses
compile-time errors to inform the caller about pattern violations.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This trait will be implemented by every type that our
derive_deftly(TorConfig) template generates. It will, among other
things, help us figure out the Builder type for a given config type
in cases where string-pasting magic is intractable, or where we
want to use assert_not_impl to double-check the attributes.
|
| | |
| |
| |
| |
| | |
The derive-deftly TorConfig template will use these as appropriate
for the inputs to setter functions, based on field types.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
If we don't do this, then any attempt to use it from a derive-deftly
template will cause a warning about referring to it as
$crate::macroname.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
derive_deftly wants to expand types before passing them to
macro_rules macros, which is quite reasonable. But map_builder
wants its input collection type to be an `ident`, not a `path`.
(And macro_rules doesn't accept `path` before a `<`.)
To fix this, we're providing an alternative syntax for map_builder,
where the inputs are the map type and the builder map type.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
We were only using it for Default, and it is easier to implement
Default by hand than it is to keep this particular layer in our
leaning tower of macros.
|
| |\ \
| | |
| | |
| | |
| | | |
proto: Fix relay/hs-service feature gating
See merge request tpo/core/arti!3534
|
| | | |
| | |
| | |
| | | |
We now have add_ent_with_id(), so we can just remove the TODO.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Without this, `tor-proto` doesn't compile if you enable the `relay`
feature but not `hs-service`.
|
| | |/
|/|
| |
| |
| | |
Multiplying 8 * GIB overflows the usize limit (4 GIB - 1) on 32-bit
platforms. So handle this properly for 32-bit platforms
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Refactor common code that builds circtargets for HS.
Closes #1223
See merge request tpo/core/arti!3530
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This code was duplicated across hsclient and hsservice.
Logically, it belongs in netdir, since that's where we have the
latest required-protocol information, and the ability to look up
relays by IDs.
Closes #1223
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes part of #2193.
(Edits from nickm: I selected the cases here that I could verify
were correct from immediate context.)
Edited-by: Nick Mathewson <[email protected]>
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
tor-netdoc: Implement new authority certificates
See merge request tpo/core/arti!3462
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit implements directory authority certificates using the
`parse2` approaches.
For now, those are in a module `doc::authcert::tmp`, with the eventual
goal of moving it into its super module after removing/deprecating the
legacy types.
|
| | | | |
|
| |\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
proto: Bump criterion, criterion-cycles-per-byte to 0.8.0
Closes #2281
See merge request tpo/core/arti!3528
|
| | |/
| |
| |
| | |
Closes #2281
|
| |\ \
| | |
| | |
| | |
| | | |
Make Protocols type inherently interned; add notes about usage.
See merge request tpo/core/arti!3524
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
(It's now done in tor_protover.)
|
| | | |
| | |
| | |
| | |
| | | |
This will help us with all the places we want to copy around
Protocols objects.
|
| | | |
| | |
| | |
| | | |
This will help us make it self-interning.
|
| | | | |
|
| | | | |
|
| | |/ |
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc: Store n_authorities in usize
See merge request tpo/core/arti!3522
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, this value was stored in a u16. However, because this
number is usually always derived from some sort of list type, such as
`Vec`, it makes more sense to use usize for this, as it avoid
unnecessary casting and error checking.
|
| | | |
| | |
| | |
| | |
| | | |
This provides a way to explicitly consume the encoder and finish the
item, without use of mem::drop.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new derive is going to want this. So it would need to be at least
`#[doc(hidden)]`. But it makes sense to expose it.
But, it had a weird signature. Make its signature like that of `.arg_empty()`.
(Note that an ItemEncoder contains just a `&mut NetdocEncoder`.)
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
These cannot be encoded. So that is logically incoherent.
(Perhaps String ought not to be NormalItemArgument, but let's not
tackle that now.)
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
talking about the "keyword argument syntax" makes it sound a bit like
its' the *keyword* that is wrong.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
NormalItemArgument is for types where we use the Display as the netdoc
argument formatter. But what if gives the empty string?
Previously we would allow `add_arg` to handle the error. That would
record it in the NetdocEncoder. That's kind of OK, but it will
prevent the caller from aborting early (and from elaborating the error).
|
| | | | |
|