| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Add the finish() function that for now simply calls the generic
finish(). There is a bunch of TODO in the code in this commit explaining
why we haven't made the implementation relay specific just yet.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commits takes out the relay specific code out of UnverifiedChannel
and puts it in UnverifiedRelayChannel.
In order to pull this off, we added some fiels to the VerifiedChannel
struct so the relay code get back generated data from the
UnverifiedChannel::check() in order to do its validation work and yield
a VerifiedRelayChannel.
This also lead to a cleanup of expect() and ChannelType::is_initiator().
Signed-off-by: David Goulet <[email protected]>
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The new UnverifiedRelayChannel and VerifiedRelayChannel struct are added
to decouple the client code and put the relay component in its module.
Both objects hold the to become generic object that both client and
relay will use to create a channel.
Signed-off-by: David Goulet <[email protected]>
|
| |\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | |
| | | | | | | | |
| | | | | | | | | |
arti-relay: Add config options for OR port
See merge request tpo/core/arti!3466
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We don't plan to use the builders.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
arti-relay has required config options, which means that
`TorRelayConfig` cannot have a default.
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I don't expect that we'll need this.
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \
| | |_|_|/ / / / /
| |/| | | | | / /
| |_|_|_|_|_|/ /
|/| | | | | | | |
http-connect: Improve error reporting.
See merge request tpo/core/arti!3476
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It makes more sense to have the conversion here, so it can use an
exhaustive match over ErrorKind.
This isn't the final API; I'm just moving the code from `arti`.
|
| |\ \ \ \ \ \ \
| |_|_|_|/ / /
|/| | | | | |
| | | | | | |
| | | | | | | |
tor-netdoc: Misc docs improvements (mostly parse2)
See merge request tpo/core/arti!3479
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We're going to have separate traits for encoding.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Once upon a time this trait handled multiplicity. But it doesn't any more.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is not impl for all FromStr. We have NormalItemArgument now.
|
| |/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
This was added at some point, but not documented.
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
tor-netdoc: Make much more of encode module public
See merge request tpo/core/arti!3471
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3471#note_3288716
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
clippy points out that if argument-less `new` can exist, so should
Default.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
My planned new derive for encoding will be pub, but cfg gated, like
parse2 is.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
My planned encoding derive macro is going to provide keywords as
literal strings.
(The purpose of this trait is to allow the old parser to be generic
over its keyword constants, not to provide type-safety against passing
non-keyword strings to document encoders. Such bugs aren't very
likely and will be especially unlikely when we're deriving encoders.)
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
My planned encoding derive macro is not going to use `decl_keyword!`
but will need to call `NetdocEncoder::item`.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
NetdocEncoder::item uses it this way. Presumably it is right at
least in those cases where this method is called.
The only implementor of this trait right now is the output from
`decl_keyword!` in the old parser, which is (generally) expected to be
the actual keyword.
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Replace RelayFlags, using enumset
See merge request tpo/core/arti!3477
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3477#note_3289536
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
EnumSet<RelayFlag> implements PartialEq, so we can derive this rather
than open-coding it.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The only thing generated by this macro is `set_iter_keywords` which
is only used in the test to check that the macro call is correct.
Abolish it all.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This existed because it was once an impl on the old RelayFlags.
Now, it's on RelayFlag which is sensibly FromStr.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Abolish the constants with the transitional names.
This also abolishes the controversial name `H_S_DIR`, which Rust case
transformation rules generated from `HSDir`.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Now:
`RelayFlag` is a single flag, which is a different type to
`RelayFlags`.
`FromStr` and `Display` are now implemented in a normal way for a
single flag.
We don't use bitflags, with its funky input syntax, any more.
Instead, we have a normal enum.
No longer is it possible to have a `RelayFlags` with "unknown bits"
set (whatever that means). (Therefore, an associated test case for
this is now gone.)
The names are principally specified just as enum variant names. The
enum variant names can be identical to the network document keywords.
Briefly, we provide constants in capitals, for the benefit of all the
call sites. That means that *this* commit can contain only the
primary changes.
A few macro-generated things have been adjusted in this commit, but
they are actually going to go away.
Indentation is now wrong. We'll fix that at the end.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This will reduce noise in the actual functional change commit.
(But, this is all going to go away. That will bei justified on its
merits, after the overhaul is done.)
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
bitflags provides .bits() but enumset provides .as_repr().
Make this change at all call sites now.
|