summaryrefslogtreecommitdiff
path: root/crates/tor-chanmgr
Commit message (Collapse)AuthorAgeFilesLines
* release: Bump tor- and arti- crate versions.Wesley Aptekar-Cassels2026-05-061-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p arti-client 0.42.0 cargo set-version -p arti-config 0.42.0 cargo set-version -p arti-relay 0.42.0 cargo set-version -p arti-rpc-client-core 0.42.0 cargo set-version -p arti-rpcserver 0.42.0 cargo set-version -p arti-testing 0.42.0 cargo set-version -p arti-ureq 0.42.0 cargo set-version -p tor-async-utils 0.42.0 cargo set-version -p tor-basic-utils 0.42.0 cargo set-version -p tor-bytes 0.42.0 cargo set-version -p tor-cell 0.42.0 cargo set-version -p tor-cert 0.42.0 cargo set-version -p tor-cert-x509 0.42.0 cargo set-version -p tor-chanmgr 0.42.0 cargo set-version -p tor-checkable 0.42.0 cargo set-version -p tor-circmgr 0.42.0 cargo set-version -p tor-config 0.42.0 cargo set-version -p tor-config-path 0.42.0 cargo set-version -p tor-consdiff 0.42.0 cargo set-version -p tor-dirclient 0.42.0 cargo set-version -p tor-dircommon 0.42.0 cargo set-version -p tor-dirmgr 0.42.0 cargo set-version -p tor-dirserver 0.42.0 cargo set-version -p tor-error 0.42.0 cargo set-version -p tor-events 0.42.0 cargo set-version -p tor-general-addr 0.42.0 cargo set-version -p tor-geoip 0.42.0 cargo set-version -p tor-guardmgr 0.42.0 cargo set-version -p tor-hsclient 0.42.0 cargo set-version -p tor-hscrypto 0.42.0 cargo set-version -p tor-hsrproxy 0.42.0 cargo set-version -p tor-hsservice 0.42.0 cargo set-version -p tor-key-forge 0.42.0 cargo set-version -p tor-keymgr 0.42.0 cargo set-version -p tor-linkspec 0.42.0 cargo set-version -p tor-llcrypto 0.42.0 cargo set-version -p tor-log-ratelim 0.42.0 cargo set-version -p tor-memquota 0.42.0 cargo set-version -p tor-memquota-cost 0.42.0 cargo set-version -p tor-netdir 0.42.0 cargo set-version -p tor-netdoc 0.42.0 cargo set-version -p tor-persist 0.42.0 cargo set-version -p tor-proto 0.42.0 cargo set-version -p tor-protover 0.42.0 cargo set-version -p tor-ptmgr 0.42.0 cargo set-version -p tor-relay-crypto 0.42.0 cargo set-version -p tor-relay-selection 0.42.0 cargo set-version -p tor-rpcbase 0.42.0 cargo set-version -p tor-rpc-connect 0.42.0 cargo set-version -p tor-rtcompat 0.42.0 cargo set-version -p tor-rtmock 0.42.0 cargo set-version -p tor-socksproto 0.42.0 cargo set-version -p tor-units 0.42.0
* release: Bump safelog version to 0.8.2.Wesley Aptekar-Cassels2026-05-061-1/+1
|
* linkspec: Rename all_addrs_allowed_for_extend()David Goulet2026-04-091-2/+4
| | | | | | Also set a better error message when validating channel target. Signed-off-by: David Goulet <[email protected]>
* relay: Pass advertise SocketAddr to channel builder instead of IpAddrDavid Goulet2026-04-092-8/+8
| | | | | | | | | | This trickles down to the tor-proto channel handshake code. But, the real need is in the channel builder in order to validate the outbound channel target. Fixes #2440 Signed-off-by: David Goulet <[email protected]>
* chanmgr: Validate the ChanTarget for both client and relayDavid Goulet2026-04-091-41/+64
| | | | | | | | | | It used to be only with the feature = relay but since client can have that feature enabled, we now validate based on channel outbound type instead. Related to #2440 Signed-off-by: David Goulet <[email protected]>
* Merge branch 'create-fast' into 'main'opara2026-04-083-4/+85
|\ | | | | | | | | Add support for handling CREATE_FAST cells and launching a circuit reactor See merge request tpo/core/arti!3846
| * tor-{proto,chanmgr}: change how channels accept a CREATE* handlerSteven Engler2026-04-081-18/+13
| | | | | | | | | | | | | | | | | | | | | | Instead of giving the `CreateRequestHandler` to the channel after it's constructed, we integrate it into the handshake so that we can give it to the channel constructor. The `ChannelType` is no longer part of the `Channel`. Some of the tests could be cleaned up slightly now that the channel doesn't need the `ChannelType`, but I don't want to conflict with !3853.
| * tor-chanmgr: add support for a `CreateRequestHandler`Steven Engler2026-04-083-4/+90
| |
* | Update to derive-deftly 0.11.0 to pick up `meta_quoted rigorous`Ian Jackson2026-04-021-1/+1
|/
* Merge branch 'fixes_mr3791' into 'main'David Goulet2026-03-313-114/+183
|\ | | | | | | | | Address post-merge comments from nickm's review in mr 3791 See merge request tpo/core/arti!3802
| * linkspec: Rename has_all_public_addresses()David Goulet2026-03-301-1/+1
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * linkspec: Rename has_all_reachable_addresses()David Goulet2026-03-301-1/+1
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * linkspec: Rename has_all_valid_port() to has_all_nonzero_port()David Goulet2026-03-301-2/+2
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * proto: Rename RelayIdentities to RelayChannelAuthMaterialDavid Goulet2026-03-303-41/+50
| | | | | | | | | | | | | | | | | | | | | | | | This object contains a melting pot of public keys, private keys and certificates. Rename it to reflect that it is channel authentication material and not "identities. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374454 Signed-off-by: David Goulet <[email protected]>
| * proto: Rename many variables with more fine grained namingDavid Goulet2026-03-301-7/+7
| | | | | | | | | | | | | | | | | | | | Mostly, identity a `ChanTarget` as a "target" since we juggle with PeerInfo and OwnedChanTarget nowadays. All certificate and keys have very specific names which attempts to match the spec as much as possible. Signed-off-by: David Goulet <[email protected]>
| * chanmgr: Always use MaybeSensitive<PeerAddr> when building a channelDavid Goulet2026-03-301-7/+6
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * chanmgr: Add a build_client_channel() helper functionDavid Goulet2026-03-301-59/+83
| | | | | | | | | | | | | | | | | | | | | | | | This moves the client channel building code into build_client_channel() to match the build_relay_channel() function pattern. No behavior change, just code movement. Small changes were needeed (reference for instance) but no behavior change. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374448 Signed-off-by: David Goulet <[email protected]>
| * chanmgr: Move relay target PT validation in validate_relay_target()David Goulet2026-03-301-6/+9
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * chanmgr: Validate the relay channel target addressesDavid Goulet2026-03-301-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the port is non zero and that all addresses are globally reachable. Notice the use of ChanProto error in this commit instead of UnusableTarget. Relay channel initiator are opened by the circuit reactor meaning from an EXTEND2 request meaning the target is not controlled by us so any errors is a channel protocol violation. UnusableTarget is an internat Bug. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374447 Signed-off-by: David Goulet <[email protected]>
* | Update to derive-deftly 0.10.0.Ian Jackson2026-03-311-1/+1
| | | | | | | | There are no breaking changes.
* | Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with nailing-cargo -Eu set-version -p arti-client 0.41.0 nailing-cargo -Eu set-version -p arti-relay 0.41.0 nailing-cargo -Eu set-version -p arti-rpcserver 0.41.0 nailing-cargo -Eu set-version -p arti-ureq 0.41.0 nailing-cargo -Eu set-version -p arti-rpc-client-core 0.41.0 nailing-cargo -Eu set-version -p tor-basic-utils 0.41.0 nailing-cargo -Eu set-version -p tor-error 0.41.0 nailing-cargo -Eu set-version -p tor-general-addr 0.41.0 nailing-cargo -Eu set-version -p tor-geoip 0.41.0 nailing-cargo -Eu set-version -p tor-memquota-cost 0.41.0 nailing-cargo -Eu set-version -p tor-llcrypto 0.41.0 nailing-cargo -Eu set-version -p tor-cert-x509 0.41.0 nailing-cargo -Eu set-version -p tor-rtcompat 0.41.0 nailing-cargo -Eu set-version -p tor-rtmock 0.41.0 nailing-cargo -Eu set-version -p tor-async-utils 0.41.0 nailing-cargo -Eu set-version -p tor-config 0.41.0 nailing-cargo -Eu set-version -p tor-config-path 0.41.0 nailing-cargo -Eu set-version -p tor-rpc-connect 0.41.0 nailing-cargo -Eu set-version -p tor-log-ratelim 0.41.0 nailing-cargo -Eu set-version -p tor-rpcbase 0.41.0 nailing-cargo -Eu set-version -p tor-memquota 0.41.0 nailing-cargo -Eu set-version -p tor-units 0.41.0 nailing-cargo -Eu set-version -p tor-bytes 0.41.0 nailing-cargo -Eu set-version -p tor-protover 0.41.0 nailing-cargo -Eu set-version -p tor-checkable 0.41.0 nailing-cargo -Eu set-version -p tor-cert 0.41.0 nailing-cargo -Eu set-version -p tor-key-forge 0.41.0 nailing-cargo -Eu set-version -p tor-hscrypto 0.41.0 nailing-cargo -Eu set-version -p tor-socksproto 0.41.0 nailing-cargo -Eu set-version -p tor-linkspec 0.41.0 nailing-cargo -Eu set-version -p tor-cell 0.41.0 nailing-cargo -Eu set-version -p tor-persist 0.41.0 nailing-cargo -Eu set-version -p tor-keymgr 0.41.0 nailing-cargo -Eu set-version -p tor-relay-crypto 0.41.0 nailing-cargo -Eu set-version -p tor-proto 0.41.0 nailing-cargo -Eu set-version -p tor-netdoc 0.41.0 nailing-cargo -Eu set-version -p tor-consdiff 0.41.0 nailing-cargo -Eu set-version -p tor-netdir 0.41.0 nailing-cargo -Eu set-version -p tor-relay-selection 0.41.0 nailing-cargo -Eu set-version -p tor-chanmgr 0.41.0 nailing-cargo -Eu set-version -p tor-ptmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dircommon 0.41.0 nailing-cargo -Eu set-version -p tor-guardmgr 0.41.0 nailing-cargo -Eu set-version -p tor-circmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirclient 0.41.0 nailing-cargo -Eu set-version -p tor-dirmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirserver 0.41.0 nailing-cargo -Eu set-version -p tor-hsclient 0.41.0 nailing-cargo -Eu set-version -p tor-hsservice 0.41.0 nailing-cargo -Eu set-version -p tor-hsrproxy 0.41.0
* | Bump versions: patchlevel, with dependenciesIan Jackson2026-03-301-1/+1
| | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with cargo set-version --offline --bump patch -p safelog
* | Plumb web-time-compat/full dependency through everywhere.Ian Jackson2026-03-301-0/+1
|/ | | | As generated by maint/fixup-features.
* tor-chanmgr: port to web-time-compat.Nick Mathewson2026-03-262-11/+10
|
* tor-chanmgr: don't `warn_report!` for failed connectionsSteven Engler2026-03-241-1/+0
| | | | | | | | | | | | | | | | | | | | `warn_report!` is useful when there's an error that we need to ignore and can't propagate up the call stack. But here we're using `warn_report!` while also returning the error in a `Error::ChannelBuild`. This is not great because: 1. The caller should warn if it wants to, since it will have the error message and the proper context. 2. This code is doing something like happy eyeballs, which means we only care that one connection succeeds, not if any fail. One instance where this is problematic is when running Arti on a machine without IPv6 support. If connecting to a relay with both an IPv4 and IPv6 address, the IPv6 attempt will always fail. We don't want to warn about every outgoing IPv6 connection failure when the IPv4 connection succeeds.
* chanmgr: Don't build relay channel if method is not DirectDavid Goulet2026-03-191-0/+6
| | | | Signed-off-by: David Goulet <[email protected]>
* chanmgr: Clarify the use of no identity ChanTargetDavid Goulet2026-03-191-6/+10
| | | | Signed-off-by: David Goulet <[email protected]>
* chanmgr: Don't get the peer cert as a responder channelDavid Goulet2026-03-191-9/+1
| | | | | | | | No initiator present a TLS certificate and so don't try to get one. Fixes #2388 Signed-off-by: David Goulet <[email protected]>
* chanmgr: Add a comment/TODO about channel expiryDavid Goulet2026-03-181-0/+16
| | | | Signed-off-by: David Goulet <[email protected]>
* chanmgr: Support reconfigure of unauthenticated channelsDavid Goulet2026-03-181-5/+8
| | | | Signed-off-by: David Goulet <[email protected]>
* chanmgr: Use the unauth_channels listDavid Goulet2026-03-181-7/+12
| | | | | | Put channel without relay identities in the unauth_channels list. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Add a list of unauthenticated channelsDavid Goulet2026-03-181-0/+13
| | | | | | | | | | | Needed to handle client/bridge -> relay channels which are not authenticated meaning they don't have a RelayIds so they can't be put in the ListByRelayIds<>. Feature gate it to "relay" as a client will never have those kind of channels. Signed-off-by: David Goulet <[email protected]>
* cargo fmtNihal2026-03-181-6/+9
|
* tor-chanmgr: add loopback validation, startup warning and httparseNihal2026-03-185-176/+333
|
* tor-chanmgr: split handshake into helper functionsNihal2026-03-181-14/+47
|
* tor-chanmgr: fix type inference in handshakeNihal2026-03-182-6/+6
|
* tor-chanmgr: refactor handshake into helper functionsNihal2026-03-181-30/+53
|
* tor-chanmgr: add base64ct dependency and docsNihal2026-03-181-0/+1
|
* tor-chanmgr: implement HTTP CONNECT proxy handshake and wire transportNihal2026-03-182-20/+186
|
* tor-chanmgr: add ProxyProtocol::HttpConnect variant and URI parsingNihal2026-03-181-36/+205
|
* Merge branch 'cargo-update' into 'main'gabi-2502026-03-041-0/+1
|\ | | | | | | | | Run cargo update post-release See merge request tpo/core/arti!3740
| * rtmock, chanmgr: Allow use of deprecated try_next() in testsGabriela Moldovan2026-03-031-0/+1
| | | | | | | | | | | | | | | | futures 0.3.32 has deprecated UnboundedReceiver::try_next() in favor of UnboundedReceiver::try_recv(), but try_recv() was only introduced in 0.3.32, so using it would cause our minimal versions checks to fail (rightfully so, because our code wouldn't build with futures 0.3.x for x < 32).
* | tor-proto: send an AUTH_CHALLENGE during testsSteven Engler2026-03-031-0/+5
|/ | | | | | | As far as I know, a responder will always send an AUTH_CHALLENGE cell since it doesn't yet know if the initiator is a client or relay. The spec also doesn't have any mention about the AUTH_CHALLENGE being optional. So we should send it in our tests as well.
* safelog: Rename MaybeSensitive::hidden/visible()David Goulet2026-03-031-3/+4
| | | | | | Rename them to respectively sensitive() and not_sensitive(). Signed-off-by: David Goulet <[email protected]>
* chanmgr: Safely log the peer in the channel builderDavid Goulet2026-03-032-18/+24
| | | | | | | | | On I/O error, we safely log the peer address that was used that lead to this error. Closes #2375 Signed-off-by: David Goulet <[email protected]>
* proto: Make channel PeerAddr sensitiveDavid Goulet2026-03-031-1/+6
| | | | | | | Only the R2R channel that the PeerAddr becomes unsensitive. The rest, we keep it sensitive as it can be a client or a client's guard/bridge. Signed-off-by: David Goulet <[email protected]>
* Remove semver.md files post-releaseGabriela Moldovan2026-03-031-1/+0
|
* Bump all the unstable tor- and arti- crates to 0.40.0.Gabriela Moldovan2026-03-021-20/+20
| | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.40.0 done
* Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2026-03-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list-crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy ``` Because this release bumps the MSRV, I am bumping the minor version of all of them. MINOR=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* chanmgr: Rename function parameterDavid Goulet2026-02-261-3/+3
| | | | | | | It was _target before because we had it in the function with a cfg_if!(). Now don't so no need. Signed-off-by: David Goulet <[email protected]>