summaryrefslogtreecommitdiff
path: root/crates/tor-cell
Commit message (Collapse)AuthorAgeFilesLines
* Bump version of tor-basic-utilsIan Jackson2025-08-051-1/+1
| | | | This was accidentally omitted from my version bump script.
* Version bumps for 1.4.6Ian Jackson2025-08-051-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made with the following shell script: export CARGO='nailing-cargo -Eu' # Non-functional changes only maint/bump_nodep hashx # Special $CARGO set-version -p arti 1.4.6 # Additional features, no breaking changes, depended on in tree $CARGO set-version -p safelog 0.4.8 # Unconditional bump to 0.33.0 xargs -I P <<END $CARGO set-version -p P 0.33.0 tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* Bump derive-deftly to 1.2.0Ian Jackson2025-08-041-1/+1
| | | | No upstream changes that break our code.
* tor-cell: add `FlowCtrlVersion::V0`Steven Engler2025-07-161-0/+3
|
* tor-cell: change `UnparsedRelayMsg::data_len`Steven Engler2025-07-153-9/+52
| | | | | | | | | It now performs some validation and can return a `Result`. We perform validation here since different cell formats may have different maximum data lengths in the future, and `UnparsedRelayMsg` doesn't expose the cell format so it's difficult to perform this validation at a higher layer.
* tor-cell: remove `flowctl-cc` feature and make XON/XOFF cells stableSteven Engler2025-07-154-11/+2
| | | | | I don't see any further changes being needed for these types, and it simplifies a lot of future code in tor-proto that uses these types.
* tor-cell: add a const constructor for `FlowCtrlVersion`Steven Engler2025-07-151-7/+14
|
* Bump all the unstable tor- and arti- crates to 0.32.0.Gabriela Moldovan2025-07-071-11/+11
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.32.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-07-071-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 ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - hashx - equix - caret - safelog - retry-error * crates where APIs were broken (bump minor): - fs-mistrust (the implicit once_cell feature was removed) The bumps from this commit were created using this script: ``` PATCH=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret safelog retry-error " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" fs-mistrust " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* Upgrade to derive-deftly 1.1.0.Gabriela Moldovan2025-07-071-1/+1
| | | | | | I had to also bump `toml` to `0.8.23`, because `toml 0.8.22` is incompatible with `serde_spanned 0.6.9` (which is automatically pulled in because of the d-d upgrade).
* tor-cell: fix incorrect XON/XOFF cell command integersSteven Engler2025-06-231-5/+5
|
* tor-cell: add `Xon`/`Xoff` cellsSteven Engler2025-06-093-1/+185
|
* tor-cell: add experimental `flowctl-cc` featureSteven Engler2025-06-091-0/+3
|
* release: Delete semver.md files after release.Alexander Hansen Færøy2025-06-051-5/+0
|
* release: Bump all tor-/arti- crates to 0.31.0.Alexander Hansen Færøy2025-06-051-11/+11
| | | | | | | | This was done using: for crate in $(./maint/list_crates | grep -P '^tor-|^arti-'); do cargo set-version -p $crate 0.31.0 done
* Sort dependencies to make cargo sort happy.Alexander Hansen Færøy2025-06-041-1/+2
|
* Fix various missing incorrect feature entries as prep for release.Alexander Hansen Færøy2025-06-031-1/+1
|
* arti, cell, dirclient: Use expect instead of unwrap.Nick Mathewson2025-05-291-2/+3
| | | | | | Clippy nightly detects this problem, though earlier clippy verisons haven't. The common element here is applying unwrap() to the result from a write!().
* cell: fix warning from nightly about unused function.Nick Mathewson2025-05-291-0/+1
|
* Add methods for getting proof-of-work extension from intro request.Wesley Aptekar-Cassels2025-05-272-1/+10
|
* All crates: bump rust-version to 1.83.Nick Mathewson2025-05-131-1/+1
|
* cell: Teach extlist definition macro to make conditional extensionsNick Mathewson2025-05-072-1/+7
| | | | | We need the macro to propagate only certain #[meta] values to all places where a case is used.
* cell: Implement SubprotocolRequest extension from prop346.Nick Mathewson2025-05-072-1/+139
| | | | Part of #1945.
* cell: Unify HS-ntor and ntor-v3 extensions.Nick Mathewson2025-05-076-32/+22
| | | | | | Implements proposal 358. Closes #1946.
* cell,proto: Split request/response extensions into seprate typesNick Mathewson2025-05-072-21/+45
| | | | Implements part of proposal 358.
* cell: Use ExtList to implement CircRequestExt.Nick Mathewson2025-05-072-105/+100
| | | | This required some renaming, so that the types and their codes matched.
* Rename NtorV3Extension to CircRequestExtNick Mathewson2025-05-072-19/+21
| | | | | | | This type will, because of prop358, be shared by ntorv3, hs-ntor, and probably other future handshakes. There will also be a CircResponseExt type.
* cell: Make decl_extension_group macro more self-contained.Nick Mathewson2025-05-074-14/+21
| | | | Previously it required the caller to import a whole bunch of stuff.
* cell: Clarify documentation in extlist.rs.Nick Mathewson2025-05-071-11/+10
| | | | It is no longer hs only.
* cell: move ExtList module out of hs module.Nick Mathewson2025-05-076-7/+6
| | | | We're going to use it for ntorv3 extensions as well.
* proto, cell: Remove RelayCellFormatTrait.Nick Mathewson2025-05-062-51/+1
| | | | | | | | | | | | | | | | The purpose of the trait was to parameterize the tor1 cell crypto on the different possible relay cell layouts. It made sense to have this trait when we thought we would implement the new cell layout for prop340 (packed-and-fragmented) well before we implemented CGO. But it now appears all but certain that CGO will land long before we make any more headway on prop340. Therefore, it doesn't make sense to carry the ability to customize `tor1` for other relay cell layouts. Removing this trait saves a fair bit of complexity.
* proto: Use SendmeTag in place of CircTagNick Mathewson2025-05-062-4/+4
| | | | | This doesn't make much change yet, but does save us an allocation when handling SENDMEs.
* tor-cell: define a new SendmeTag typeNick Mathewson2025-05-061-9/+149
| | | | | | | | | | | | | | | | This is a more efficient representation for the tag on an authenticated SENDME message: it comes in at 21 bytes. Previously, we used Vec<u8>, which has 24 bytes of overhead (on a 64 bit system), plus malloc overhead, plus 20 bytes of allocated tag. We had a similar type to this as `tor_proto::congestion::sendme::CircTag`, but it could only accomodate 20-byte values. I don't expect that we will have enough of these simultaneously that the memory savings will matter, but the allocation savings could be significant.
* release: Bump all unstable tor/arti crates to 0.30.0Wesley Aptekar-Cassels2025-05-012-14/+10
| | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* tor-cell: optimize slice indexingSteven Engler2025-04-301-2/+2
|
* tor-cell: rename `STREAM_ID_OFFSET` to `STREAM_ID_OFFSET_V0`Steven Engler2025-04-301-3/+3
|
* tor-cell: add some testing for `UnparsedRelayMsg`Steven Engler2025-04-301-4/+27
|
* tor-cell: add `UnparsedRelayMsg::data_len`Steven Engler2025-04-301-1/+21
|
* Update rand requirement to 0.9.1Nick Mathewson2025-04-291-1/+1
| | | | | (This is going to be a _requirement_, since rand 0.9.1 has a behavioral change from 0.9.0)
* Run cargo update.Wesley Aptekar-Cassels2025-04-291-1/+1
| | | | | I updated everything except rand, because the new version of rand interacts with #1903, thus requiring more care.
* cell: simpler (?) approach to StreamIdReqNick Mathewson2025-04-161-22/+43
| | | | | | Instead of having a StreamIdReq that indicates "None in V1, Any in V0", take an optional RelayCellFormat as an argument.
* cell: simpler approach to assert-checking offsetsNick Mathewson2025-04-162-11/+13
|
* cell, proto: Use correct Data sizes for v1 relay cellsNick Mathewson2025-04-164-8/+32
| | | | | | | | | | | | Since v1 cells have a longer tag, they can fit less data into a single cell. Ah well, that's the cost of improved security. The code in data.rs is a little wonky, in that it currently requires its buffer to be exactly the maximum size for a data cell. We have a TODO about fixing that in the future, but for now I've moved it to use a boxed slice rather than a boxed array. Part of #1944.
* cell: Remove the deprecated Data::split_from().Nick Mathewson2025-04-162-14/+1
|
* cell: Implement parsing and encoding for V1 relay cellsNick Mathewson2025-04-163-21/+221
| | | | This is the main part of #1944, and will be needed for CGO.
* cell: Add a debugging-only method to simplify debug_asserts.Nick Mathewson2025-04-162-12/+12
|
* cell: Refine StreamIdReq for V1 relay cells, with minimal changesNick Mathewson2025-04-161-8/+14
| | | | | | | | | | Fortunately, the type is crate-internal, so this is not a breaking change. The key insight with this change is that, from the _caller's_ POV, the set of cells that are allowed to have StreamIDs has not changed. The only difference is that the V1 relay cell code needs to distinguish unrecognized commands from the SENDME case.
* cell: Create an unimplemented RelayCellFormat::V1Nick Mathewson2025-04-161-10/+30
|
* Add a RelayCellFormat argument to encode().Nick Mathewson2025-04-163-8/+15
| | | | | | | | | This will let us actually _send_ messages in the right format. This approach is not ideal for packed/fragmented messages; they will need a separate RelayCellEncoder. part of #1944.