aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-linkspec
Commit message (Collapse)AuthorAgeFilesLines
...
| * linkspec: Tests for PtTargetSettingsNick Mathewson2022-11-281-0/+46
| |
| * PtTransportName: Remove unused accessors.Nick Mathewson2022-11-281-13/+0
| |
| * linkspec: Add tests for has_any_identity.Nick Mathewson2022-11-281-0/+7
| |
| * linkspec: Add test for lookup on no-ids.Nick Mathewson2022-11-281-0/+1
| |
| * Add a test for ByRelayIds::remove_by_all_idsNick Mathewson2022-11-281-2/+21
| |
* | Remove deprecated aliases in tor-linkspec.Nick Mathewson2022-11-292-10/+2
| |
* | Add a default debug_redacted impl to save space.Nick Mathewson2022-11-281-4/+0
| |
* | linkspec: Give a Redacted form for chantarget.Nick Mathewson2022-11-285-7/+84
|/
* Make ChannelMethod non-exhaustiveIan Jackson2022-11-242-1/+2
| | | | | | | | | 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.
* tor-linkspec: Provide LoggedChanTarget type alias and utility methodIan Jackson2022-11-233-2/+14
| | | | | This makes it easy to talk about, and construct, a BoxSensitive<OwnedChanTarget>, which is what we'll use in errors.
* TransportId: Fix test case for no pt-targetIan Jackson2022-11-221-16/+19
| | | | | | | | | | | 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`
* TransportId: Parse "bridge" as builtin transportIan Jackson2022-11-221-3/+8
| | | | | This will allow transport="bridge" in bridge configurations, etc. Doing it at this layer means it will be recognised everywhere.
* TransportId: Provide new_builtin and new_pluggableIan Jackson2022-11-221-0/+15
| | | | | I think normal Rustic practice is to provide a real constructor as well as just `Default`.
* TransportId: Provide name accessor and deconstructorIan Jackson2022-11-221-0/+26
| | | | | We are maintaining the notion that at some point this thing might grow additional variants.
* TransportId: Document and change string repr for builtinIan Jackson2022-11-221-6/+16
| | | | | | * Change the Display of builtin to "-" * Parse "" and "-" as builtin, as well as "<none>" * Document this
* TransportId: Add test case for builtin Display reprIan Jackson2022-11-221-0/+2
|
* BridgeAddr rename from PtTargetAddr: Update in tor-linkspecIan Jackson2022-11-213-29/+38
| | | | | | | | | | | | | | 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
* tor-linkspec: Provide deconstructors for PtTargetSettings and PtTargetIan Jackson2022-11-212-0/+11
|
* Fix a missing import in tests.Nick Mathewson2022-11-181-1/+1
| | | | I'm not sure why the CI didn't reject this the first time around.
* Merge branch 'refactor_into_ownedchantarget' into 'main'Nick Mathewson2022-11-183-9/+21
|\ | | | | | | | | CircMgr: Refactor DirSpecificTarget constructor See merge request tpo/core/arti!866
| * CircMgr: Refactor DirSpecificTarget constructorNick Mathewson2022-11-183-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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)
* | Merge branch 'mark-bridges-not-experimental' into 'main'Nick Mathewson2022-11-182-5/+10
|\ \ | | | | | | | | | | | | | | | | | | Mark bridge and PT-related APIs as non-experimental. Closes #643 See merge request tpo/core/arti!865
| * | linkspec: Make "pt-client" non-experimental.Nick Mathewson2022-11-162-5/+10
| |/
* | Remove impl Display for OwnedCircTargetNick Mathewson2022-11-172-8/+1
| | | | | | | | | | Nothing used this; if anything wants it, it would be better off calling `.display_chan_target()`.
* | ChanTarget: Add a display function, with better output.Nick Mathewson2022-11-172-13/+80
|/ | | | | | | | | | 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
* Allow a subset-only ChanMethod match when looking up a BridgeConfigNick Mathewson2022-11-151-0/+15
| | | | | | | | | 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.
* Remove allow() for a false-positive warn on Rust 1.56.Nick Mathewson2022-11-101-3/+0
|
* Upgrade to serde_with 2, phf 0.11. Closes #526.Nick Mathewson2022-11-101-1/+1
|
* bump rust-version to 1.60 in every crate.Nick Mathewson2022-11-101-1/+1
|
* linkspec: Rename "maybe rename this?" TODOs in favor of #623Nick Mathewson2022-11-072-5/+0
|
* PtTargetSettings: Enforce correctness at lower level.Nick Mathewson2022-11-071-19/+49
| | | | This resolves a number of TODOs.
* Remove a blank lineNick Mathewson2022-11-071-1/+0
|
* Downgrade TODO on chan_methodNick Mathewson2022-11-071-1/+1
| | | | | This is not something we need to solve for 1.1.0 (and it might not need to be solved ever).
* Remove TODO about third ChannelMethod variant.Nick Mathewson2022-11-071-2/+0
| | | | We didn't find a use for this.
* Remove TODO about inlining PtTargetSettings.Nick Mathewson2022-11-071-7/+0
| | | | | Since there are (or soon will be) parsing restrictions on this type, we don't want to inline it as a simple Vec.
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* Require derive_more 0.99.3Ian Jackson2022-11-031-1/+1
| | | | | | | | 0.99.[012] have a bug https://github.com/JelteF/derive_more/issues/114 which makes the Deref derive for bridgedesc::StateGuard not work and therefore breaks minimal-versions CI. It seems simpler to require the newer version everywhere.
* Merge branch 'guards_as_bridges_part2' into 'main'Nick Mathewson2022-10-272-1/+57
|\ | | | | | | | | Use ByRelayIds to hold guards in GuardSet See merge request tpo/core/arti!808
| * ByRelayIds: Add additional accessor functions.Nick Mathewson2022-10-251-0/+51
| | | | | | | | | | These are the ones that turned out to be necessary while converting guard samples to use ByRelayIds.
| * linkspec: add HasRelayIds::has_any_identity.Nick Mathewson2022-10-251-1/+6
| |
* | impl Hash for BridgeConfig and various PT informationIan Jackson2022-10-271-3/+3
|/ | | | | The bridge descriptor manager wants to index data structures by the BridgeConfig.
* linkspec: specify sort order for HasRelayIds.Nick Mathewson2022-10-241-2/+13
|
* linkspec: Remove now-useless declared_peer_addrNick Mathewson2022-10-241-5/+0
| | | | The singleton variation here is almost never what we want.
* guardmgr: Refactor the interior of FirstHop.Nick Mathewson2022-10-243-26/+89
| | | | | | | | | | | | | Now it contains either an `OwnedChanTarget` or an `OwnedCircTarget`, which will let `GuardMgr` return bridges that can be used to make circuits. As part of this change, it was necessary to revise some address-modification functions that applied to filters and `OwnedChanTarget`. Now they do the smart thing, and remove only the address that are in the `ChanMethod`. This means that the addresses from HasAddrs are still accurate about which addresses the relay "has".
* linkspec: Add compare-by-relay-ids function to HasRelayIdsNick Mathewson2022-10-213-3/+74
|
* Merge branch 'pt-serde' into 'main'Nick Mathewson2022-10-203-72/+25
|\ | | | | | | | | serde support for PtTarget See merge request tpo/core/arti!780
| * Implement serde for PtTarget and its members.Nick Mathewson2022-10-202-5/+20
| | | | | | | | This will let us remember bridges that use pluggable transports.
| * Inline now-needless variant constructors for PtTargetAddrNick Mathewson2022-10-201-22/+2
| |
| * Remove a now-needless `allow(dead_code)`Nick Mathewson2022-10-201-1/+0
| |
| * linkspec: Always expose PT-related types.Nick Mathewson2022-10-202-46/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `PtTarget` type and its contents (`TransportName`, `PtTargetAddr`, `PtSettings`) are now unconditionally compiled and exposed. This will allow us to serialize and deserialize them in our guard-state files even when we have been built without explicit PT support. The `pt-client` feature controls whether `TransportName` is a variant of `TransportId`, and whether `PtTarget` is a variant of `ChanMethod`: this in turn means that we'll still have simpler binary code and smaller structures when we're building without PT support (which is what we wanted when we initially made these types conditional).