summaryrefslogtreecommitdiff
path: root/crates/arti-relay
Commit message (Collapse)AuthorAgeFilesLines
* Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* arti-relay: add `log_sensitive_information` config optionSteven Engler2026-03-242-0/+32
|
* arti-relay: change a 'debug' log to 'info'Steven Engler2026-03-241-2/+2
| | | | | I had intended for this to be 'info' in f287ec7910, but must have accidentally wrote 'debug'.
* Fix typosTobias Stoeckmann2026-03-242-2/+2
| | | | Typos found with codespell
* relay: Pass now() instead of the runtime in the crypto taskDavid Goulet2026-03-171-37/+31
| | | | | | | | | This way we get the whole task job to be aligned on one single now value to avoid potential inconsistencies between expiry and key generation. Fixes #2404 Signed-off-by: David Goulet <[email protected]>
* relay: Add crypto tasks unit testDavid Goulet2026-03-172-1/+244
| | | | | | Tests the key rotation code. Signed-off-by: David Goulet <[email protected]>
* relay: Use same wallclock() time when generating keysDavid Goulet2026-03-171-8/+6
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Make the crypto tasks use the runtime wallclockDavid Goulet2026-03-172-25/+42
| | | | | | This way we can unit tests properly. Signed-off-by: David Goulet <[email protected]>
* relay: Rewrite the rotation key logic in the crypto taskDavid Goulet2026-03-171-163/+245
| | | | | | | | | | | | | | | | | | | | | | This is almost a full rewrite of the crypto task which was needed in order to support our relay signing certificate to be put in the keystore which will be needed for the offline key feature. Instead of having rotate_key() do all the things, we now instead do two pass: 1. Remove all expired keys and certs. 2. Generate any missing keys. This still results in using the minimum valid_until of all our keys for the task sleep time. We can know cleanup the local trait used for this gymnastic and trade it for some more KeyMgr gymnastic. Fixes #2404 Signed-off-by: David Goulet <[email protected]>
* relay: Don't log warn if key already exists when generating oneDavid Goulet2026-03-171-4/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Remove leftover comment from previous code iterationDavid Goulet2026-03-171-4/+0
| | | | Signed-off-by: David Goulet <[email protected]>
* Merge branch 'typos' into 'main'opara2026-03-162-3/+3
|\ | | | | | | | | Fix various typos See merge request tpo/core/arti!3781
| * Fix grammar typosTobias Stoeckmann2026-03-152-2/+2
| |
| * Fix word duplicate typosTobias Stoeckmann2026-03-151-1/+1
| |
* | Fix windows cargo warningsTobias Stoeckmann2026-03-151-1/+3
|/ | | | Disable use-statements which are only needed for unix.
* arti-relay: Log relay identitiesSteven Engler2026-03-122-0/+33
|
* Merge branch 'cell-order' into 'main'opara2026-03-043-33/+4
|\ | | | | | | | | Improve error messages during channel handshake See merge request tpo/core/arti!3745
| * tor-basic-utils: move `iter_join` from arti-relaySteven Engler2026-03-033-33/+4
| | | | | | | | Will clean this up in the following commit.
* | Bump strum to 0.28Gabriela Moldovan2026-03-041-1/+1
|/
* Merge branch '2.1.0-bumps' into 'main'gabi-2502026-03-021-25/+25
|\ | | | | | | | | Version bumps for 2.1.0 See merge request tpo/core/arti!3733
| * Bump all the unstable tor- and arti- crates to 0.40.0.Gabriela Moldovan2026-03-021-23/+23
| | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* | Run fixup-features in preparation for releaseGabriela Moldovan2026-03-021-0/+3
|/
* arti-relay: use `debug_report` for failed channelsSteven Engler2026-02-261-1/+8
|
* proto: The AUTHENTICATE cell requires the SHA256 RSA identity digestDavid Goulet2026-02-261-1/+1
| | | | | | | Before this commit, we would use the RsaIdentity which is a SHA1 digest. We do the same for the peer RSA key. Signed-off-by: David Goulet <[email protected]>
* relay: Sleep rotate key task with earliest valid_untilDavid Goulet2026-02-251-19/+54
| | | | Signed-off-by: David Goulet <[email protected]>
* chanmgr: Responder relay channel now use the builder my_addrsDavid Goulet2026-02-242-21/+4
| | | | | | No need to pass from the arti relay binary our addresses when handling an incoming channel, use the one in the channel builder that an initiator channel uses.
* relay: Set ChanMgr with our addressesDavid Goulet2026-02-241-2/+3
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Update ChanMgr on key rotationDavid Goulet2026-02-242-9/+20
| | | | Signed-off-by: David Goulet <[email protected]>
* Merge branch 'err-msgs' into 'main'David Goulet2026-02-242-8/+15
|\ | | | | | | | | arti-relay: Improve error/warning messages See merge request tpo/core/arti!3711
| * arti-relay: fix stale commentSteven Engler2026-02-231-1/+1
| | | | | | | | This method was renamed previously.
| * arti-relay: add more error contextSteven Engler2026-02-231-6/+12
| |
| * arti-relay: don't warn if key gen was successfulSteven Engler2026-02-231-1/+2
| |
* | tor-relay: convert to derive_deftly(TorConfig)Nick Mathewson2026-02-242-56/+44
|/
* relay: Setup const for hardcoded value in crypto taskDavid Goulet2026-02-231-8/+13
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Log when key generation yields an existing key errorDavid Goulet2026-02-231-1/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Simplify the crypto rotation task rotate_key()David Goulet2026-02-231-17/+11
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Get rid of start_task() for readabilityDavid Goulet2026-02-232-22/+10
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Generate relay identities at initDavid Goulet2026-02-232-7/+17
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Implement a helper to build RelayIdentitiesDavid Goulet2026-02-232-7/+111
| | | | | | | This required to add a slight helper to our tor-key-forge RSA key d-d macro to access the inner keypair. This avoids a clone. Signed-off-by: David Goulet <[email protected]>
* relay: Remove unused ephemeral keystoreDavid Goulet2026-02-231-5/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Move try_generate_keys() into crypto taskDavid Goulet2026-02-232-39/+29
| | | | | | | Move rotating keys into a function so we can use it in try_generate_keys() that is used at startup. Signed-off-by: David Goulet <[email protected]>
* relay: Add a crypto task for key rotationDavid Goulet2026-02-233-1/+183
| | | | | | | | | | | | | This task crypto module has a rotate key task that is in charge of rotating keys from our KeyMgr based on the valid until. To do so, we add a RotatableKeySpec trait to help us specify our to rotate a specific key. Allows us to have a generic rotate/generate function for all our keys. Task runs every 60 seconds. Taken from C-tor. Signed-off-by: David Goulet <[email protected]>
* 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
* relay: Add a TLS acceptor in the ChanBuilderDavid Goulet2026-02-091-7/+10
| | | | | | | | | | | | | | | 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]>
* relay: Enable "tls-server" feature flag for tor-rtcompatDavid Goulet2026-02-091-1/+1
| | | | | | | This makes it that we can get a server TLS acceptor provider which we need for incoming connections. Signed-off-by: David Goulet <[email protected]>
* arti-relay: launch the client's background tasksSteven Engler2026-02-032-9/+41
|
* arti-relay: rename 'bootstrap()' method to 'init()'Steven Engler2026-02-032-7/+8
| | | | This method won't really be used for bootstrapping anymore.