summaryrefslogtreecommitdiff
path: root/crates/tor-chanmgr
Commit message (Collapse)AuthorAgeFilesLines
...
| * tor-chanmgr: fix outbound_proxy deserialization for builderNihal2026-02-161-3/+6
| |
| * tor-chanmgr: fix builder serde attrNihal2026-02-161-1/+1
| |
| * tor-chanmgr: fix proxy config parsing and clippy lintNihal2026-02-163-2/+24
| |
| * deps: add percent_encoding and remove serdeNihal2026-02-162-1/+2
| |
| * tor-chanmgr: improve ProxyProtocol documentationNihal2026-02-161-42/+159
| |
| * tor-chanmgr: remove SocketAddr and improve errorNihal2026-02-162-22/+15
| |
| * tor-chanmgr: add URI-style parsing for ProxyProtocol outbound_proxy configNihal2026-02-164-10/+264
| |
| * tor-chanmgr: integrate outbound proxy into DefaultTransportNihal2026-02-163-15/+41
| |
| * tor-chanmgr: add From<ProxyError> for io::Error conversionNihal2026-02-161-0/+6
| |
| * tor-chanmgr: add ProxyProtocol config type for outbound proxyNihal2026-02-161-0/+30
| |
* | Merge branch 'msrv-1.89' into 'main'Nick Mathewson2026-02-162-1/+2
|\ \ | | | | | | | | | | | | Bump MSRV to 1.89 See merge request tpo/core/arti!3684
| * | Allow clippy::collapsible_if to triggerGabriela Moldovan2026-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | `clippy::collapsible_if` started triggering after bumping the MSRV to 1.88. Since this triggers from a lot of places, and since there even are a couple of instances where we explicitly allow `clippy::collapsible_ifs`, I've opened #2342 for deciding what to do about it.
| * | Bump MSRV from 1.86 to 1.89Gabriela Moldovan2026-02-161-1/+1
| |/ | | | | | | | | | | | | As agreed at our last team meeting. See https://gitlab.torproject.org/tpo/core/arti/#minimum-supported-rust-version
* | Merge branch 'relay-own-cert' into 'main'David Goulet2026-02-161-1/+6
|\ \ | | | | | | | | | | | | relay: Pass our TLS cert to the responder verify process See merge request tpo/core/arti!3665
| * | relay: Pass our TLS cert to the responder verify processDavid Goulet2026-02-121-1/+6
| |/ | | | | | | | | | | | | | | | | | | For the responder to build the authentication data, it needs its own certificate of the TLS handshake that it is responding to (as a TLS server). This resolves an important TODO(relay) in the code. Signed-off-by: David Goulet <[email protected]>
* | Merge branch 'chan-target-addr' into 'main'David Goulet2026-02-162-2/+33
|\ \ | |/ |/| | | | | | | | | tor-chanmgr: Add additional `get_or_launch()` tests and update doc comment Closes #2344 See merge request tpo/core/arti!3676
| * tor-chanmgr: add doc comment to `ChanMgr::get_or_launch()`Steven Engler2026-02-121-0/+6
| |
| * tor-chanmgr: add `get_or_launch()` tests using different addrsSteven Engler2026-02-121-2/+27
| | | | | | | | | | When there are two channel requests with the same identities and different socket addresses, we return the same channel.
* | Merge branch 'channel-canonical' into 'main'David Goulet2026-02-124-19/+71
|\ \ | |/ |/| | | | | Implement channel canonicity See merge request tpo/core/arti!3668
| * chan: Use Canonicity when choosing a channelDavid Goulet2026-02-124-3/+49
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * chanmgr: Use the actual channel target used on connect()David Goulet2026-02-121-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connecting, we pass an OwnedChanTarget that can contain a list of IPs of the relay we want to connect to. The connect() picks one and return the actual OwnedChanTarget used as in the real IP address we are using. From that point on, we must only use that as the channel canonicity requires to check against the IP we believe we are connected to. This also is much better to use for error handling considering the error is on the actual channel target, not the hypothetical one. Signed-off-by: David Goulet <[email protected]>
| * proto: Channel finish() now handles canonicityDavid Goulet2026-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All handshake pass the NETINFO cell, the advertised addresses (if any) and the peer address in order to build the Canonicity and build the channel with it. In order to pull this off, the "my_addrs" were added to several object along the NETINFO cell. We also pass the channel method when connecting (initiator) to a relay as we need this for this canonicity build. Signed-off-by: David Goulet <[email protected]>
* | tor-chanmgr: update comment in `open_channel_is_allowed()`Steven Engler2026-02-111-2/+10
| |
* | tor-chanmgr: channel selection functions take a `HasAddrs`Steven Engler2026-02-111-18/+28
| | | | | | | | | | | | | | We will want our channel selection functions (`open_channel_is_allowed`, `pending_channel_maybe_allowed`, and `choose_best_channel`) to inspect the requested target addresses in the future (see their TODOs), so these functions need to take a `HasAddrs` to get those addresses.
* | tor-chanmgr: add `HasAddrs` bound to `AbstractChannelFactory::BuildSpec`Steven Engler2026-02-112-19/+31
|/ | | | | This will be needed later so that our channel selection functions can take a `HasAddrs`.
* relay: Fix tor-chanmgr and tor-proto cargo featuresDavid Goulet2026-02-091-1/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Relay responder channel allow to be non_exhaustiveDavid Goulet2026-02-091-1/+0
| | | | Signed-off-by: David Goulet <[email protected]>
* chanmgr: Fix the outbound_chan_type() to not be based on relay featureDavid Goulet2026-02-091-10/+4
| | | | | | | A client can have the relay feature enabled. The presence of "identities" is what dictates if we are a relay or not. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Gate relay only functionDavid Goulet2026-02-092-0/+2
| | | | | | | | | Also, allow the `ChanMgr::runtime` to be unused as client don't use it yet but might one day. Simpler this way than feature gating it for relay only. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Add inbound open channel to our listDavid Goulet2026-02-092-9/+26
| | | | Signed-off-by: David Goulet <[email protected]>
* chanmgr: Build channel/reactor on incoming connectionsDavid Goulet2026-02-091-6/+74
| | | | | | | | Implement the accept_from_transport() in the ChanBuilder. This returns a `Channel` and spawns a reactor. Signed-off-by: David Goulet <[email protected]>
* relay: Add a TLS acceptor in the ChanBuilderDavid Goulet2026-02-093-24/+54
| | | | | | | | | | | | | | | This requires the `TlsKeyAndCert` so be passed on the TLS acceptor settings. We assume that `RelayIdentities` has this information. The ChanBuilder::new() was getting a bit too convoluted and feature gated to instead we introduce new_client() and new_relay() and remove the need for `with_identities()`. Because of this, the ChanMgr::new() now returns a `Result<>`. Related to #1597 Signed-off-by: David Goulet <[email protected]>
* Merge branch 'unnecessary-async' into 'main'David Goulet2026-02-091-1/+1
|\ | | | | | | | | proto: Make ChannelProvider::get_or_launch() synchronous See merge request tpo/core/arti!3647
| * proto: Make ChannelProvider::get_or_launch() synchronousGabriela Moldovan2026-02-041-1/+1
| | | | | | | | This just removes an unnecessary `async`.
* | chanmgr: Always use connect target for error reportingDavid Goulet2026-02-041-14/+6
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | chanmgr: Use the new tor-proto relay channel APIDavid Goulet2026-02-041-43/+112
|/ | | | | | | | | With specific types now for relay channels, add a function to build the channel and run the reactor. That function is feature gated and thus relay only. Signed-off-by: David Goulet <[email protected]>
* release: Remove semver.md files from 2.0.0 release.Wesley Aptekar-Cassels2026-02-021-2/+0
|
* rtcompat: Return certificates as Cow.Nick Mathewson2026-02-021-1/+5
|
* release: Bump `arti-*` and `tor-*` crates to 0.39.0Wesley Aptekar-Cassels2026-02-021-20/+20
| | | | | | | | | | Done via: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.39.0 done ```
* chanmgr: Make a padding test function non-asyncGabriela Moldovan2026-01-271-3/+2
|
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* proto: Improve comment for handle_incoming()David Goulet2026-01-221-5/+6
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Remove async for VerifiableChannel::check()David Goulet2026-01-221-16/+15
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Send relay channel NETINFO in check()David Goulet2026-01-221-15/+19
| | | | | | | | | | Once channel is verified and authenticate if need be, send the NETINFO. We require our advertised IP addresses for this so pass them to launch() as well to the UnverifiedRelayChannel. A cargo fmt change slipped in here, sorry about that. Signed-off-by: David Goulet <[email protected]>
* proto: Make VerifiableChannel::check() asyncDavid Goulet2026-01-221-1/+1
| | | | | | | | | Relay initiator needs to send CERTS and AUTHENTICATE in that function after verifiying the channel. And thus require to be async. Signed-off-by: David Goulet <[email protected]>
* relay: Pass advertised addresses to the channel handlerDavid Goulet2026-01-226-12/+23
| | | | | | | | | | | We need the advertised addresses for the NETINFO cell when opening a relay channel. Keep them in the TorRelay object so we can pass them to the ChanMgr channel handler. This will also help with config reload where only the local values in TorRelay will need to be updated. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Spawn task for ChannelProvider impl of get_or_launch()David Goulet2026-01-131-17/+23
| | | | | | | | | | | | | To pull this off, ChannelProvider::get_or_launch() needed to change from "&self" to "self: Arc<Self>" so we could pass self to the spawned task. This is fine as the caller of ChannelProvider (circuit reactor) has a Arc<ChanMgr>. This also removes the PhantomData for the runtime as we now actually use it. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Get rid of the builder outbound_chan_typeDavid Goulet2026-01-133-37/+33
| | | | | | | | | | | | | | | | | | | Instead, we'll simply use `RelayInitiator` if the identity keys (identities) struct is set. This avoids the problem where someone could call outbound_chan_type() of the ChanMgrConfig and get the wrong channel type if with_identities() is set after. This way, a single call, `with_identities()` is what will define the outbound channel type so no chance of errors. This also removes the cfg_if {} around the builder creation in a much more simplified version. Related to #1599 Signed-off-by: David Goulet <[email protected]>
* chanmgr: Add semver.md for breaking changesDavid Goulet2026-01-131-0/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* build: Fixes for non relay featureDavid Goulet2026-01-131-2/+6
| | | | Signed-off-by: David Goulet <[email protected]>