summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | tor-netdoc: parse2: Move multiplicity docs examples into Methods traitsIan Jackson2025-11-191-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to combine all the Selector types, so it won't be able to have these. The diff is misleading: it's docs for the Selectors that's moving.
* | | | | | | | | | | Merge branch 'end_reason_handling' into 'main'Nick Mathewson2025-11-241-1/+38
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http-connect: use end reason for http status if possible See merge request tpo/core/arti!3481
| * | | | | | | | | | http-connect: use end reason for http status if possibleNick Mathewson2025-11-241-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spec includes a direct conversion from END reason fields to HTTP status codes, so we should follow it if we have an END reason.
* | | | | | | | | | | opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-2440-18/+194
| |_|_|_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are all aimed at figuring out in more detail what's going on in #2079 and related issues.
* | | | | | | | | | Merge branch 'bug2172' into 'main'Nick Mathewson2025-11-243-3/+3
|\ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-llcrypto: Stop deriving Deref in CtByteArray Closes #2172 See merge request tpo/core/arti!3432
| * | | | | | | | | tor-llcrypto: Stop deriving Deref in CtByteArrayNeel Chauhan2025-11-243-3/+3
| | |_|_|_|_|_|_|/ | |/| | | | | | |
* | | | | | | | | Add `hsc key ctor-migrate` subcommandhjrgrn2025-11-2422-8/+163
| |_|_|/ / / / / |/| | | | | | |
* | | | | | | | hashx: Gate as_u8() behind the compiler featureGabriela Moldovan2025-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This resolves a dead code warning when building without the `compiler` feature: ``` warning: method `as_u8` is never used --> crates/hashx/src/register.rs:39:19 | 27 | impl RegisterId { | --------------- method in this implementation ... 39 | pub(crate) fn as_u8(&self) -> u8 { | ^^^^^ | = note: `#[warn(dead_code)]` on by default ```
* | | | | | | | Merge branch 'readd-error-deduping' into 'main'Ian Jackson2025-11-202-23/+16
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "retry-error: stop trying to dedup error msgs" See merge request tpo/core/arti!3474
| * | | | | | | | retry-error: add comment in `fmt_error_with_sources`Steven Engler2025-11-181-0/+4
| | | | | | | | |
| * | | | | | | | Revert "retry-error: stop trying to dedup error msgs"Steven Engler2025-11-182-23/+12
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e0efb477df868baf09d37de99e8e346136e66140. There wasn't a consensus on this change, so sticking with the status quo.
* | | | | | | | tor-circmgr: fix incorrect match on `HsOnly`Steven Engler2025-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rust was treating this as a wildcard match if the `hs-common` feature wasn't enabled. This shouldn't have caused any bugs since the other match arms were already exhaustive, but this could have lead to a bug if new enum variants were added to `SupportedTunnelUsage`. ```text warning: variable `HsOnly` should have a snake case name --> crates/tor-circmgr/src/usage.rs:600:13 | 600 | HsOnly => { | ^^^^^^ help: convert the identifier to snake case: `hs_only` | = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default warning: `tor-circmgr` (lib) generated 1 warning ```
* | | | | | | | Merge branch 'relay-split-channels' into 'main'David Goulet2025-11-198-319/+577
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proto: Split UnverifiedChannel and VerifiedChannel into client/relay module See merge request tpo/core/arti!3401
| * | | | | | | | proto: Add a semver entry for ClientInitiatorHandshakeDavid Goulet2025-11-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Remove unused code from testDavid Goulet2025-11-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Move comment in relay handshake.rsDavid Goulet2025-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Remove unused function from ClientChannelBuilderDavid Goulet2025-11-191-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Add a TODO relay for ChannelBuilderDavid Goulet2025-11-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Remove a .expect() of a digest array conversionDavid Goulet2025-11-191-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We know from the start that this is 32 bytes so no reason to hard fail if not, just propagate the right type from the start. Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Update generic channel commentsDavid Goulet2025-11-191-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Make cargo doc happyDavid Goulet2025-11-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Implement part of UnverifiedRelayChannel::finish()David Goulet2025-11-191-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UnverifiedChannel::finish() was split in previous commit so this adds the support for sending the right NETINFO cell instead of the client specific one. Added more TODOs for followup commits. Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Split VerifiedChannel::finish()David Goulet2025-11-192-25/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the client specific code into VerifiedClientChannel as in sending the NETINFO cell. The rest is pretty much boiler plate to build a channel reactor. The relay finish() code is coming in a followup commit. Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Use the new client specific channelsDavid Goulet2025-11-192-28/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By changing the connect() returned object we therefore officially make VerifiedChannel and UnverifiedChannel crate only objects. Thus, this commit changes visibility on most things. Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Add client specific handshake channel structsDavid Goulet2025-11-193-7/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the UnverifiedClientChannel and VerifiedClientChannel mirroring the relay API for channels. It plainly uses the generic object underneath as for now those objects are client only. Followup commits will make things more client specific. No behavior change. Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Move client handshake into client channel moduleDavid Goulet2025-11-195-129/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only moves code from src/channel to src/client/channel. It introduces a ClientChanBuilder that is used to launch client specific channel by the public ChanBuilder. The followup commits will add a VerifiedClientChannel and UnverifiedClientChannel in order to again decouple client and relay code from the generic objects. Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Add VerifiedRelayChannel implementationDavid Goulet2025-11-192-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the finish() function that for now simply calls the generic finish(). There is a bunch of TODO in the code in this commit explaining why we haven't made the implementation relay specific just yet. Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Add UnverifiedRelayChannel implementationDavid Goulet2025-11-194-125/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commits takes out the relay specific code out of UnverifiedChannel and puts it in UnverifiedRelayChannel. In order to pull this off, we added some fiels to the VerifiedChannel struct so the relay code get back generated data from the UnverifiedChannel::check() in order to do its validation work and yield a VerifiedRelayChannel. This also lead to a cleanup of expect() and ChannelType::is_initiator(). Signed-off-by: David Goulet <[email protected]>
| * | | | | | | | proto: Introduce relay specific channel structsDavid Goulet2025-11-191-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new UnverifiedRelayChannel and VerifiedRelayChannel struct are added to decouple the client code and put the relay component in its module. Both objects hold the to become generic object that both client and relay will use to create a channel. Signed-off-by: David Goulet <[email protected]>
* | | | | | | | | Merge branch 'relay-or-config' into 'main'opara2025-11-196-72/+252
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | arti-relay: Add config options for OR port See merge request tpo/core/arti!3466
| * | | | | | | | arti-relay: remove checks on "advertise" addressesSteven Engler2025-11-191-53/+8
| | | | | | | | |
| * | | | | | | | arti-relay: update comment about "auto" port optionSteven Engler2025-11-181-2/+1
| | | | | | | | |
| * | | | | | | | arti-relay: fix doc commentsSteven Engler2025-11-181-5/+5
| | | | | | | | |
| * | | | | | | | arti-relay: remove builder testsSteven Engler2025-11-121-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't plan to use the builders.
| * | | | | | | | arti-relay: remove `Default` tests from configSteven Engler2025-11-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti-relay has required config options, which means that `TorRelayConfig` cannot have a default.
| * | | | | | | | arti-relay: listen at configured OR portsSteven Engler2025-11-122-13/+56
| | | | | | | | |
| * | | | | | | | arti-relay: `TorRelay::run` now takes an owned `self`Steven Engler2025-11-121-1/+1
| | | | | | | | |
| * | | | | | | | arti-relay: remove `Clone` from `TorRelay`Steven Engler2025-11-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't expect that we'll need this.
| * | | | | | | | arti-relay: added config options for OR port and advertiseSteven Engler2025-11-122-0/+200
| | | | | | | | |
| * | | | | | | | arti-relay: move `iter_join` to a new `util` moduleSteven Engler2025-11-122-28/+34
| | | | | | | | |
| * | | | | | | | arti-relay: update some commentsSteven Engler2025-11-121-7/+5
| | | | | | | | |
* | | | | | | | | Merge branch 'refactor-http-errors' into 'main'Nick Mathewson2025-11-195-83/+124
|\ \ \ \ \ \ \ \ \ | | |_|_|/ / / / / | |/| | | | | / / | |_|_|_|_|_|/ / |/| | | | | | | http-connect: Improve error reporting. See merge request tpo/core/arti!3476
| * | | | | | | error: Improve http error status code docs.Nick Mathewson2025-11-191-0/+10
| | | | | | | |
| * | | | | | | http_connect: Report end reasons for HTTP CONNECT failures.Nick Mathewson2025-11-192-7/+30
| | | | | | | |
| * | | | | | | tor-error: rustfmtNick Mathewson2025-11-181-63/+64
| | | | | | | |
| * | | | | | | tor-error: Provide a more reasonable API for http status codes.Nick Mathewson2025-11-183-8/+11
| | | | | | | |
| * | | | | | | tor-error: Add support for ErrorKind->HTTP status conversionNick Mathewson2025-11-185-80/+84
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes more sense to have the conversion here, so it can use an exhaustive match over ErrorKind. This isn't the final API; I'm just moving the code from `arti`.
* | | | | | | tor-netdoc: encode: Explain why NetdocEncoder contains a ResultIan Jackson2025-11-191-1/+2
| | | | | | |
* | | | | | | tor-netdoc: parse2 docs: Clarify that these are for parsingIan Jackson2025-11-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to have separate traits for encoding.
* | | | | | | tor-netdoc: parse2 docs: Fix ItemObjectParseableIan Jackson2025-11-191-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Once upon a time this trait handled multiplicity. But it doesn't any more.