| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
This eliminates some duplicated code.
|
| |
|
|
|
|
|
| |
This borrows from the contained key, but not from self.
This will allow us to implement RelayId::as_bytes in terms of
RelayIdRef::as_bytes.
|
| |
|
|
| |
This removes a duplicated copy of the format strings.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Unlike linkspec, this doesn't validate the actual contents of the
specifiers. We'll use this so we can handle the linkspec list for an
introduction point in an HsDesc, and just pass it on when
constructing our circuits.
I haven't added any accessor or constructor functions, because I
don't expect to need them.
|
| | |
|
| |
|
|
| |
This eliminates hardcoded length values.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
|
|
|
| |
This warning kind of snuck up on us! (See #748) For now, let's
disable it. (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)
Closes #748.
|
| |\
| |
| |
| |
| | |
tor-linkspec: Fix an unused lint
See merge request tpo/core/arti!935
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise:
cargo +stable clippy -p tor-proto --all-features --all-targets
Produces:
warning: unused import: `PtTargetAddr`
--> crates/tor-linkspec/src/traits.rs:9:28
|
9 | use crate::{ChannelMethod, PtTargetAddr, RelayIdRef, RelayIdType, RelayIdTypeIter};
| ^^^^^^^^^^^^
|
| |/
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/904#note_2858480
|
| | |
|
| |
|
|
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/issues/668#note_2858220
This commit is difficult to split up.
The innards of BridgeAddr and PtTargetAddr are still a bit entangled.
|
| |\
| |
| |
| |
| | |
Add tests for a bunch of code in tor-linkspec
See merge request tpo/core/arti!867
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
|
| |
Enums with variants conditional on cargo features must be
non-exhaustive, because cargo features are supposed to be additive,
meaning that enabling a feature (which might happen due to some random
distant thing) ought not to break things using that enum.
There were surprisingly few places to fix this.
|
| |
|
|
|
| |
This makes it easy to talk about, and construct, a
BoxSensitive<OwnedChanTarget>, which is what we'll use in errors.
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixes
cargo +stable clippy --manifest-path=/home/ian/Rustup/Arti/arti/Cargo.toml --locked --target-dir=target --offline -p tor-linkspec --no-default-features --all-targets
giving
446 | .method(ChannelMethod::Pluggable(PtTarget::new(
| ^^^^^^^^^ variant or associated item not found in `transport::ChannelMethod`
|
| |
|
|
|
| |
This will allow transport="bridge" in bridge configurations, etc.
Doing it at this layer means it will be recognised everywhere.
|
| |
|
|
|
| |
I think normal Rustic practice is to provide a real constructor as
well as just `Default`.
|
| |
|
|
|
| |
We are maintaining the notion that at some point this thing might
grow additional variants.
|
| |
|
|
|
|
| |
* Change the Display of builtin to "-"
* Parse "" and "-" as builtin, as well as "<none>"
* Document this
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
And the error too.
We need this for the API for BridgeConfigBuilder, where the user can
specify any kind of target "address", even a hostname.
It's already non-conditional, it's just that the name is too limiting.
In this commit:
* Change in tor-linkspec
* Export transitional aliases
* Add TODOs to remove the transitional aliases
|
| | |
|
| |
|
|
| |
I'm not sure why the CI didn't reject this the first time around.
|
| |\
| |
| |
| |
| | |
CircMgr: Refactor DirSpecificTarget constructor
See merge request tpo/core/arti!866
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit replaces the
`impl From<&T> for OwnedChanTarget where T:ChanTarget`
with a new `IntoOwnedChanTarget` trait. This lets us be explicit
that we're constructing an owned object, and not just converting
something.
No semver change needed, since these APIs haven't been released.
----------- (new description)
|
| | |
| |
| |
| |
| | |
Nothing used this; if anything wants it, it would be better off
calling `.display_chan_target()`.
|
| |/
|
|
|
|
|
|
|
|
| |
This change lets us display a ChanTarget's members without first
cloning them into an OwnedChanTarget.
It also resolves a reliability issue by outputting better info when
talking about connections via pluggable transports.
Closes #647
|
| |
|
|
|
|
|
|
|
| |
If we have a bridge guard that is using Direct connection and it
knows multiple addresses, our code to match it with a BridgeConfig
is wrong, because the BridgeConfig has only one address, and our
code looks for an exact match.
Fixes #642.
|
| | |
|
| | |
|
| |
|
|
| |
This resolves a number of TODOs.
|
| | |
|
| |
|
|
|
| |
This is not something we need to solve for 1.1.0 (and it might not
need to be solved ever).
|
| |
|
|
| |
We didn't find a use for this.
|
| |
|
|
|
| |
Since there are (or soon will be) parsing restrictions on this type,
we don't want to inline it as a simple Vec.
|