aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-cell
Commit message (Collapse)AuthorAgeFilesLines
* tor-cell: derive `Default` for `SubprotocolRequest`Steven Engler2026-08-121-1/+1
|
* maint: remove semver.md filesSteven Engler2026-08-031-2/+0
|
* Bump versions for tor-* and arti-* cratesSteven Engler2026-08-031-11/+11
| | | | | | | ```bash readarray -t bump < <(maint/list-crates | grep -P '^tor-|^arti-') for crate in "${bump[@]}"; do cargo set-version --bump minor -p "${crate}"; done ```
* tor-cell: add missing semver.md entriesSteven Engler2026-07-301-0/+2
| | | | I forgot to add these during a previous MR.
* tor-cell: update docs and variable names for `Xon`Steven Engler2026-07-301-10/+13
|
* tor-cell: update docs and variable names for `XonKBpsEwma`Steven Engler2026-07-301-9/+9
|
* tor-cell: rename `XonKbpsEwma` to `XonKBpsEwma`Steven Engler2026-07-301-7/+7
|
* Require derive-deftly 1.11.4Ian Jackson2026-07-231-1/+1
| | | | | | | | | We're about to *use* the fix that was in 1.11.4. We already updated the lockfile in !4228, so this is just Cargo.toml changes (which will prevent the minimal-versions tests failing when we change the code to rely on the fix). git-grep -l '^derive-deftly' |xargs perl -i~ -pe 's{\b\Q1.11.3\E\b}{1.11.4}g'
* add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
|
* Removed unnecessary lintpryty262026-07-151-1/+1
| | | | Removed unnecessary lint
* hsclient: Support protocol negotiation for CGO and flowctrl-ccNick Mathewson2026-07-021-0/+5
|
* cell: Accessors for more intro extensions.Nick Mathewson2026-07-021-7/+16
|
* cell: Make "extlist" generate methods to access variants.Nick Mathewson2026-07-021-0/+18
| | | | | This will simplify the case where we need to look up a particular extension in an ExtList.
* Upgrade to itertools 0.15.0Nick Mathewson2026-07-011-1/+1
| | | | | | Additionally, fix itertools usage in maybenot_padding.rs The definition of `Position` changed in 0.15.0.
* Remove semver.md filesNick Mathewson2026-06-301-1/+0
|
* Version bumps for 2.5.0Nick Mathewson2026-06-301-12/+12
| | | | | | | | | | | | | Closes #2617. We've lucked out this time, and it turns out that every one of our published crates gets a minor bump. So this was generated with: ``` for cr in $(./maint/list-crates); do cargo set-version -p $cr --bump minor done ```
* tor-cell: remove `derive_more::Into` for `RelayEarly`Steven Engler2026-06-242-1/+2
| | | | | We don't use this anymore, and it can lead to subtle bugs since we lose the original channel message command.
* Merge branch 'msrv-1.91' into 'main'gabi-2502026-06-181-1/+1
|\ | | | | | | | | Bump MSRV to 1.91 See merge request tpo/core/arti!4105
| * Bump MSRV to 1.91Clara Engler2026-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit bumps the MSRV to 1.91 which was released on 2025-10-30. The Cargo.toml files were updated as follows: ```sh git ls-files | \ grep ".*Cargo\.toml$" | \ xargs sed -i '' 's/^rust-version = "1\.89"$/rust-version = "1\.91"/g' ``` The following files were updated manually: ``` modified: .gitlab-ci.yml modified: README.md modified: flake.nix modified: maint/docker-android/Dockerfile ```
* | Merge branch 'flowctrl-tests' into 'main'opara2026-06-161-1/+1
|\ \ | |/ |/| | | | | tor-proto: Add unit test for `XonXoffReader` See merge request tpo/core/arti!4093
| * tor-cell: impl `PartialEq + Eq` on `XonKbpsEwma`Steven Engler2026-06-101-1/+1
| |
* | tor-cell: document that destroy reason should be NONESteven Engler2026-06-121-0/+7
|/ | | | | | | The spec was recently updated in [1], so we should make this clearer in our code comments. [1]: https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/490
* Merge branch 'clippy-string-slice' into 'main'Nick Mathewson2026-06-105-0/+5
|\ | | | | | | | | Lint for clippy::string_slice See merge request tpo/core/arti!4086
| * maint: Run maint/add_warning to deny string slicesClara Engler2026-06-095-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* | Bump derive-deftly to 1.11.3Ian Jackson2026-06-091-1/+1
|/ | | | New beta semver policy means we should pin the patchlevel.
* Bump all the unstable tor- and arti- crates to 0.43.0Gabriela Moldovan2026-06-011-11/+11
| | | | | | | | | | Done using: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.43.0 done ```
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-124-12/+16
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* release: Bump tor- and arti- crate versions.Wesley Aptekar-Cassels2026-05-061-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* tor-cert: Remove the "encode" cargo featureIan Jackson2026-04-291-1/+1
| | | | This was experimental. Everything gated by it has been stabilised.
* 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-311-0/+2
|\ | | | | | | | | Address post-merge comments from nickm's review in mr 3791 See merge request tpo/core/arti!3802
| * cell: Add Authenticate::BODY_LEN as a public constDavid Goulet2026-03-301-0/+2
| | | | | | | | | | | | | | We use this constant value when building the AUTHENTICATE cell to optimize the memory allocation as this won't ever change. 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-11/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* cell: Derive PartialEq for Begin and BeginFlagsGabriela Moldovan2026-03-251-2/+2
|
* Merge branch 'build_certs_refactor' into 'main'Nick Mathewson2026-03-232-0/+14
|\ | | | | | | | | cell, proto, cert: Simplify CERTS cell building. See merge request tpo/core/arti!3795
| * cell: Feature-gate API using the possibly absent EncodedCert type.Nick Mathewson2026-03-232-0/+5
| |
| * cell, proto, cert: Simplify CERTS cell building.Nick Mathewson2026-03-191-0/+9
| | | | | | | | | | | | | | | | Formerly we required the caller for push_cert_body to specify the type of the cert that they were pushing. But in nearly every case, the certificate object that the caller is holding knows what its own type is! This makes the tor_proto build_certs_cell function a bit less error-prone, since we don't have to worry about mismatch.
* | proto: Check the AUTHENTICATE auth type that we support itDavid Goulet2026-03-191-0/+5
| | | | | | | | | | | | | | | | As a responder, we should check the AUTHENTICATE auth type and make sure we support it. We were not doing that, we were simply putting in our max version. Signed-off-by: David Goulet <[email protected]>
* | cell: Use Error::MissingData if Authenticate fields length is wrongDavid Goulet2026-03-191-26/+16
| | | | | | | | | | | | Proper error to use and better code to use checked_sub(). Signed-off-by: David Goulet <[email protected]>
* | cell: Simplify the Authenticate APIDavid Goulet2026-03-191-16/+26
| | | | | | | | | | | | | | | | | | | | Remove the is_equal_no_sig() and instead add a getter that returns a reference to the body without the random part so it can be used to verify the signature. The caller now checks the equality with what it is expected. Signed-off-by: David Goulet <[email protected]>
* | proto: Fix AUTHENTICATE equality check and signature checkDavid Goulet2026-03-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes two things. 1. The "is_equal_no_sig()", if true, was going into the error path. 2. The signature verification is done against the body of the AUTHENTICATE cell that is all fields except the signature. Next commit will change the is_equal_no_sig() to make more sense with the "body" semantic. Signed-off-by: David Goulet <[email protected]>
* | proto: Responder channel properly validates the AUTHENTICATE cellDavid Goulet2026-03-191-1/+34
|/ | | | | | | | It is now validated against the received KP_link_ed of the initiator peer and we compare only the section of the AUTHENTICATE cell that we can compare (minus random bytes and sig). Signed-off-by: David Goulet <[email protected]>
* tor-cell: rename `RestrictedMsg::restricted_cmds()` to `cmds_for_logging()`Steven Engler2026-03-041-2/+2
|
* tor-cell: add `RestrictedMsg` traitSteven Engler2026-03-031-0/+35
|
* Bump all the unstable tor- and arti- crates to 0.40.0.Gabriela Moldovan2026-03-021-11/+11
| | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* 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
* proto: Implement a Canonicity structDavid Goulet2026-02-121-0/+12
| | | | | | | | | | | | | | | | | This struct will be put in a Channel and derived from the received NETINFO cell. This follows the C-tor implementation for which we have two indicator of canonicity: 1. Peer is canonical: the address they advertise in the NETINFO cell matches the one we see on the TCP connection. 2. Canonical to peer: the peer sees us as canonical. Those flag will get used to select "the best" channel. Signed-off-by: David Goulet <[email protected]>