summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-netdoc: Add dependencies: derive-deftly, paste, strum, testresultIan Jackson2025-08-141-0/+4
| | | | | | testresult is a new dependency for arti.git. (It's being added as a test-dependenchy here.) It is has a very useful Result type for use in test cases.
* tor-netdoc: Always expose NicknameIan Jackson2025-08-142-7/+1
| | | | | This is a fine API. The representation may change, but that wouldn't be breaking.
* tor-netdoc: Improve and expose Fingerprint parsing adaptersIan Jackson2025-08-142-4/+25
| | | | | | | | | | | We won't want them ever to be anything other than a wrapper around `RsaIdentity`, so we can make them transparent. Derive various useful traits, including Deref. Expose them publicly, since there's no reason not to do so. (The new parser will want to reuse them. It's in-crate, but out-of-crate users may want to use these too for other netdoc types.)
* tor-netdoc: Expose base64_decode_multiline to crateIan Jackson2025-08-141-1/+1
| | | | The new parser is going to reuse this.
* tor-netdoc: sort the experimental cargo featuresIan Jackson2025-08-141-2/+2
|
* netdoc test data: Switch two tests to new consensus dataIan Jackson2025-08-143-243/+3
|
* netdoc test data: refresh (for first time) by running scriptIan Jackson2025-08-1435-0/+3393
|
* netdoc test data: Provide script for downloading from CIIan Jackson2025-08-142-0/+89
| | | | Plan to gradually move over to this semiautomatically-maintained data.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-0723-99/+128
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Update code for Edition 2024Nick Mathewson2025-08-072-3/+7
| | | | | | | | | | | | | | | | | | 1. Run cargo fix --edition 2. Selectively revert the "if let"->"match" changes. These changes are meant to protect us from the lifetime changes for "if let" bindings in Rust 2024. But we're not actually relying on the old lifetime rules anywhere, and the match syntax here is quite ugly. 3. Automatically revert `$pat:expr_2021` to `$pat:expr`. (We don't actually want to restrict the expression syntax that our macros accept). Done with `git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'` 4. Run cargo fmt.
* Bump to hex-literal 1.0Nick Mathewson2025-08-051-2/+2
| | | | | (We were unable to do this before, since it required a rust version we didn't have.)
* Set MSRV to 1.85.Nick Mathewson2025-08-051-1/+1
|
* Bump version of tor-basic-utilsIan Jackson2025-08-051-2/+2
| | | | This was accidentally omitted from my version bump script.
* Version bumps for 1.4.6Ian Jackson2025-08-051-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge branch 'prop360-combined' into 'main'Nick Mathewson2025-07-105-9/+177
|\ | | | | | | | | | | | | Implement proposal 360 (limit HsDesc inflation opportunities) Closes #2046 See merge request tpo/core/arti!3070
| * Suggestions from @gabi-250 on prop360 implementation.Nick Mathewson2025-07-101-2/+2
| |
| * netdoc, hsservice: Respect maximum descriptor sizesNick Mathewson2025-07-101-2/+17
| | | | | | | | | | It would be better to take a more sophisticated approach; see #2048.
| * netdoc: Add note about prop360Nick Mathewson2025-07-101-0/+6
| |
| * netdoc: Tread a few more kinds of errors as suspicious.Nick Mathewson2025-07-101-1/+6
| | | | | | | | | | In particular, these are errors that provide an opportunity to inflate the size of an hsdesc download.
| * hs*: Define some HsDesc errors as _suspicious_.Nick Mathewson2025-07-101-0/+22
| | | | | | | | | | These errors are suspicious as hsdir inflation attacks, in the context of prop360.
| * netdoc: disallow extraneous space within final signature itemNick Mathewson2025-07-103-1/+51
| | | | | | | | Part of proposal 360.
| * netdoc: Fix Item::end_pos() behavior, and add tests.Nick Mathewson2025-07-101-6/+30
| | | | | | | | | | Previously it didn't include end-of-line space, even though the docs said it did.
| * Add test to enforce parser behavior wrt start-of-line space.Nick Mathewson2025-07-101-0/+46
| |
* | Typo fixes (automatic and hand-verified)Nick Mathewson2025-07-091-1/+1
|/ | | | Made with https://crates.io/crates/typos-cli
* Bump all the unstable tor- and arti- crates to 0.32.0.Gabriela Moldovan2025-07-071-13/+13
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.32.0 done ```
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* tor-netdoc: Upgrade to phf 1.12.1.Gabriela Moldovan2025-07-071-1/+1
|
* tor-netdoc: Removed dependency on `once_cell`hashcatHitman2025-06-1410-41/+41
| | | | | | - Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`. Signed-off-by: hashcatHitman <[email protected]>
* release: Bump all tor-/arti- crates to 0.31.0.Alexander Hansen Færøy2025-06-051-13/+13
| | | | | | | | This was done using: for crate in $(./maint/list_crates | grep -P '^tor-|^arti-'); do cargo set-version -p $crate 0.31.0 done
* ./maint/cargo_sort: Run cargo-sort on the entire workspace.Gabriela Moldovan2025-05-271-1/+4
| | | | | | | | | | | | | | | | | | | The [latest version] of `cargo-sort` is more opinionated than the previous one, and is now causing the `rust-checks` job to fail on `main`. This commit applies the fixes needed to satisfy the new `cargo-sort` rules. These changes were generated by running `cargo sort --workspace` several times, until `cargo sort --check --workspace` finally succeeded (it couldn't fix all the errors in one go, for some reason). I have omitted the changes `cargo-sort` made to the top-level `Cargo.toml`, to preserve the topological ordering of the workspace members. Closes #2014 [latest version]: https://github.com/DevinR528/cargo-sort/blob/f066ae80e5e6f5c1d8f0e2b8099461dcb97d9656/changelog.md#200
* hs: Prevent a client from using a `MiddleOnly` relay for onion servicesNeel Chauhan2025-05-201-4/+0
| | | | | | > The actual impact of this patch is to prevent usage of MiddleOnly > relays as Introduction Points. The Rendezvous Point logic isn't > hooked up yet - nick
* Resolve clippy warnings from 1.83Nick Mathewson2025-05-134-10/+6
| | | | | Now that our MSRV is 1.83, clippy is happy to make more recommendations for us.
* All crates: bump rust-version to 1.83.Nick Mathewson2025-05-131-1/+1
|
* release: Bump all unstable tor/arti crates to 0.30.0Wesley Aptekar-Cassels2025-05-011-13/+13
| | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* 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.
* Merge branch 'proto_enforce' into 'main'Nick Mathewson2025-04-224-26/+233
|\ | | | | | | | | | | | | Enforce recommended and required protocol versions in arti-client Closes #1849 and #1923 See merge request tpo/core/arti!2929
| * netdoc: Require serde feature from tor-protover.Nick Mathewson2025-04-161-1/+1
| |
| * netdoc: improve documentation for check_protocolsNick Mathewson2025-04-161-1/+7
| |
| * protover, *: Add documentation about what "supported" means.Nick Mathewson2025-04-161-1/+2
| |
| * Fix a pair of documentation links.Nick Mathewson2025-04-161-2/+2
| |
| * Add warnings about removing supported protocols.Nick Mathewson2025-04-161-0/+2
| |
| * Implement PartialEq for ProtoStatuses unconditionally.Nick Mathewson2025-04-161-4/+2
| |
| * protover,netdoc: Implement serde for Protocols etc.Nick Mathewson2025-04-162-3/+37
| |
| * netdoc: Put all ProtoStatuses into a single Arc<>d objectNick Mathewson2025-04-162-19/+55
| | | | | | | | | | We'll want this so that we can expose them before we expose the rest of the consensus (which we need to do for spec conformance).
| * netdoc: functionality for detecting missing subprotos.Nick Mathewson2025-04-161-2/+91
| | | | | | | | Also, add a new ErrorKind for this sort of error.
| * New functions to report supported subprotocolsNick Mathewson2025-04-161-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of #1849. Note that these functions are distributed across crates, so that if (in the future) we stop doing API breaks with every release, we will get the right outputs. Note also that these functions build the list of protocols out of specific symbolic features, rather than numbers: this makes it easier to avoid errors about "which feature was Relay=4 again", and easier to avoid accidentally referring to a protocol that doesn't exist, like "Consensus" (should be "Cons") or "HsDir" (case is wrong).
* | tor-netdoc: Joined OnceLock import with other std::sync importshashcatHitman2025-04-171-2/+1
| | | | | | | | Whoops! Missed that.
* | tor-netdoc: Replace OnceCell with OnceLockhashcatHitman2025-04-171-3/+3
|/ | | | - [`once_cell::sync::OnceCell`] has been replaced by [`std::sync::OnceLock`].
* tor-netdoc: use more idiomatic rustSteven Engler2025-04-031-2/+1
|