summaryrefslogtreecommitdiff
path: root/crates/tor-linkspec
Commit message (Collapse)AuthorAgeFilesLines
* Bump versions for tor-* and arti-* cratesSteven Engler2026-08-031-7/+7
| | | | | | | ```bash readarray -t bump < <(maint/list-crates | grep -P '^tor-|^arti-') for crate in "${bump[@]}"; do cargo set-version --bump minor -p "${crate}"; done ```
* 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'
* Merge branch 'remove-lint' into 'main'Jim Newsome2026-07-153-6/+1
|\ | | | | | | | | | | | | Removed unnecessary lint Closes #2556 See merge request tpo/core/arti!4210
| * Remove now-unneeded allow(clippy::cognitive_complexity)Jim Newsome2026-07-151-4/+0
| |
| * add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
| |
| * Removed unnecessary lintpryty262026-07-152-2/+1
| | | | | | | | Removed unnecessary lint
* | Merge branch 'da-relayid' into 'main'Ian Jackson2026-07-151-145/+119
|\ \ | | | | | | | | | | | | tor-linkspec: Use deftly to reduce copypasta in RelayId and RelayIdRef See merge request tpo/core/arti!4196
| * | tor-linkspec: RelayIdType: Clarify display vs display_idIan Jackson2026-07-151-4/+4
| | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4196#note_3433090
| * | tor-linkspec: Un-explode and tidy some derive listsIan Jackson2026-07-011-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | rustfmt likes this IMO-awful layout for derives. We can force it to let us manually break the line, if we use //, and then it stays put. No functional change.
| * | tor-linkspec: Sort out indentation in new macro templateIan Jackson2026-07-011-111/+111
| | | | | | | | | | | | Pure whitespace change. Review with, eg, git diff -w.
| * | tor-linkspec: PartialEq: use deftly, not an ad-hoc macro_rulesIan Jackson2026-07-011-10/+2
| | | | | | | | | | | | This gets rid of the matcher, and the need to invoke it.
| * | tor-linkspec: PartialEq: change variable namesIan Jackson2026-07-011-6/+6
| | | | | | | | | | | | | | | | | | | | | Change $var to $vname, and $type to $IDENTITY. These are the names used in the deftly template. This will make the next commit almost a no-op.
| * | tor-linkspec: PartialEq: simplify PartialEq<FooIdentity> for RelayIdIan Jackson2026-07-011-1/+1
| | | | | | | | | | | | | | | We can just refer to the PartialEq<FooIdentity> for RelayIdRef, which is macro-generated just above, replacing this copy-pasted matches.
| * | tor-linkspec: Use deftly for RelayIdId and RelayIdRef implsIan Jackson2026-07-011-44/+26
| | | | | | | | | | | | | | | | | | | | | This removes quite a lot of in-detail copy-paste. The lone `}` is being moved, bringing the code we're changing within the scope of the template.
| * | tor-linkspec: Minimal deftly for RelayIdId and RelayIdRefIan Jackson2026-07-011-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Derive the two types. We end up moving the display strings from direct attributes directed to derive_more, to deftly attributes. Indentation is rather odd now: we ought to indent the macro body. We'll sort that out at the end. No functional change.
| * | tor-linkspec: Move PartialEq implsIan Jackson2026-07-011-19/+19
| | | | | | | | | | | | | | | | | | | | | Pure code motion. We want to move this to where a bigger macro is going to be, so that it can be part of it. Code motion only, review with --color-moved.
* | | multiple crates: Fix clippy warningshjrgrn2026-07-101-1/+1
| |/ |/|
* | Upgrade to itertools 0.15.0Nick Mathewson2026-07-011-2/+2
|/ | | | | | Additionally, fix itertools usage in maybenot_padding.rs The definition of `Position` changed in 0.15.0.
* Version bumps for 2.5.0Nick Mathewson2026-06-301-9/+9
| | | | | | | | | | | | | 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 ```
* 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 ```
* | hscrypto, linkspec, llcrypto: Use new redaction helpersNick Mathewson2026-06-101-2/+5
|/ | | | This eliminates some string slicing.
* Merge branch 'clippy-string-slice' into 'main'Nick Mathewson2026-06-1010-0/+11
|\ | | | | | | | | Lint for clippy::string_slice See merge request tpo/core/arti!4086
| * everywhere: Add #[allow(clippy::string_slice)]Clara Engler2026-06-091-0/+1
| | | | | | | | | | | | | | | | This commit adds #[allow(clippy::string_slice)] to all functions in the code where string slices are used, alongside a TODO comment. We do this add the function header to have it consistent, as things like expression based allow's are still experimental.
| * maint: Run maint/add_warning to deny string slicesClara Engler2026-06-0910-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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-7/+7
| | | | | | | | | | Done using: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.43.0 done ```
* release: Bump tor- and arti- crate versions.Wesley Aptekar-Cassels2026-05-061-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add serde(default) to fields in RelayIds.Nick Mathewson2026-04-281-2/+6
| | | | | | | | With this change, we will accept serialized RelayId representations that omit one or more keys. This will eventually allow us to omit absent keys when we serialize these. This is the first stage of #2477.
* linkspec: Rename all_addrs_allowed_for_extend()David Goulet2026-04-091-2/+2
| | | | | | Also set a better error message when validating channel target. Signed-off-by: David Goulet <[email protected]>
* 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-1/+37
|\ | | | | | | | | 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-2/+2
| | | | | | | | 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]>
| * linkspec: Move has_all_valid_port() and has_all_reachable_addresses() into ↵David Goulet2026-03-302-35/+38
| | | | | | | | | | | | ChanTarget Signed-off-by: David Goulet <[email protected]>
| * linkspec: Add OwnedChanTarget address validation helpersDavid Goulet2026-03-301-1/+34
| | | | | | | | | | | | | | | | | | | | | | The has_all_reachable_addresses() should be used to validate the channel target of a request to open a relay channel. The function looks for non routable addresses or, most importantly, private addresses. The other function is to validate that all socket addresses have a non zero port. 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-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix typosTobias Stoeckmann2026-03-241-1/+1
| | | | Typos found with codespell
* tor-chanmgr: add base64ct dependency and docsNihal2026-03-181-1/+1
|
* Bump strum to 0.28Gabriela Moldovan2026-03-041-1/+1
|
* linkspec: Implement a RelayIdsBuilder::from_relay_ids()David Goulet2026-03-031-0/+18
| | | | | | | | | This is used when we build an OwnedChanTarget using the builder. Instead of going identities by identities at the callsite, we can use this helper to get us a RelayIds builder and set it in the OwnedChanTargetBuilder. Signed-off-by: David Goulet <[email protected]>
* proto: Implement Display for PeerAddrDavid Goulet2026-03-031-0/+10
| | | | | | This required to implement Display for PtTarget. Signed-off-by: David Goulet <[email protected]>
* Bump all the unstable tor- and arti- crates to 0.40.0.Gabriela Moldovan2026-03-021-7/+7
| | | | | | | | | 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 ```
* linkspec: Add missing feature gateDavid Goulet2026-02-191-0/+1
| | | | 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.