summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | dirmgr: Make various functions synchronousGabriela Moldovan2026-01-272-10/+9
| | | | | | | | | | | | | | | | | | | | To fix `clippy::unused_async`.
| * | | | hsservice: Make RendRequest::reject() synchronousGabriela Moldovan2026-01-272-1/+2
| | | | |
| * | | | hsservice: Remove unnecessary wraps from publisher functionGabriela Moldovan2026-01-271-4/+4
| | | | | | | | | | | | | | | | | | | | This lint triggers now that the unnecessary `async` is gone.
| * | | | hsservice: Remove unnecessary async from publisher functionGabriela Moldovan2026-01-271-3/+3
| | | | |
| * | | | proto: Add an exception for clippy::unused_asyncGabriela Moldovan2026-01-271-0/+1
| | | | |
| * | | | proto: Add exceptions for clippy::unused async in relay reactorGabriela Moldovan2026-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | This code is still WIP, so I propose we ignore the lint for now.
| * | | | proto: Remove unnecessary async in channel reactorGabriela Moldovan2026-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This resolves a warning triggered by the newly-introduced `#[deny(clippy::unused_async)]`.
| * | | | maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-2765-0/+65
| | | | | | | | | | | | | | | | | | | | This adds the lint to all our crates.
* | | | | rpc: Clarify comments on resolve() methods.Nick Mathewson2026-01-271-3/+3
| | | | |
* | | | | rpc: Generate a specific error for inet-auto:nonlocalNick Mathewson2026-01-271-1/+9
| | | | |
* | | | | rpc-connect: Implement json address-file format.Nick Mathewson2026-01-275-11/+41
| | | | |
* | | | | rpc: Add rpc-client-side support for inet-auto addressesNick Mathewson2026-01-273-5/+53
| | | | |
* | | | | rpc: Add rpc-server-side support for inet-auto addresses.Nick Mathewson2026-01-273-16/+97
| | | | |
* | | | | rpc: Begin implementing inet-auto address scheme.Nick Mathewson2026-01-273-30/+178
| | | | |
* | | | | Merge branch 'kist-doc' into 'main'Alexander Hansen Færøy2026-01-271-0/+1
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | clippy: Fix missing doc for non-Linux builds See merge request tpo/core/arti!3611
| * | | | clippy: Fix missing doc for non-Linux buildsClara Engler2026-01-271-0/+1
| |/ / /
* | | | Merge branch 'ticket_2304' into 'main'Nick Mathewson2026-01-274-23/+49
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | arti: Downgrade "stream closed without END" warning to debug. Closes #2304 See merge request tpo/core/arti!3608
| * | | arti: Make tor-proto dependency unconditionalNick Mathewson2026-01-271-3/+3
| | | | | | | | | | | | | | | | We now need it whether or not http-connect is enabled.
| * | | Apply 1 suggestion(s) to 1 file(s)Nick Mathewson2026-01-271-1/+1
| | | | | | | | | | | | Co-authored-by: carti-it <[email protected]>
| * | | arti: Downgrade CircuitClosed to debug level.Nick Mathewson2026-01-221-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't the long-term solution to error reporting and proxies, but it is a start that we can work from. Closes #2304.
| * | | arti: Extract function to find a ProtoError sourceNick Mathewson2026-01-222-11/+22
| | | |
| * | | tor-proto: Report CircuitClosed on unexpected stream rx closeNick Mathewson2026-01-221-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As near as I can tell, there are only three ways that the sender corresponding to this rx can be dropped: - `StreamMap::terminate` because the stream object itself was dropped. (But see #2323.) - `StreamMap::close_stream` because an END message or similar has been received. (But see #2322.) - The `StreamMap` has been dropped. The first two cases are already handled, and AFAICT the third can only happen when the circuit hop closes. That makes `CircuitClosed` the appropriate error here, not `StreamProto`. Part of a fix for #2304.
* | | | tor-rtcompat: depend on rustls 0.23.21Steven Engler2026-01-261-0/+7
| | | |
* | | | tor-basic-utils: bump slab to 0.4.7Steven Engler2026-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | This is needed since we rely on `Slab::new()` being a const fn, which was only added in 0.4.7.
* | | | Merge branch 'database-compression-bug' into 'main'Clara Engler2026-01-222-5/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-dirserver: Make compression failures a bug See merge request tpo/core/arti!3605
| * | | | tor-dirserver: Add comment on compression bugClara Engler2026-01-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a comment explaining why we treat compression errors as a bug.
| * | | | tor-dirserver: Make compression failures a bugClara Engler2026-01-222-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes `DatabaseError::Compression` because it does not fit in. Right now, this single variant makes the error to be call-site oriented which is not nice for error handling. Instead, this error should indicate that something was truly wrong with the database in itself, such as an invalid schema, a low-level SQLite bug, etc. Instead, we now map a compression error to `DatabaseError::Bug` because there is no good reason on why it should fail, given that we compress memory data to memory data. Probably because it uses the `std::io::Writer` interface which itself demands use of `std::io::Result`.
* | | | | Merge branch 'rate-limit-2' into 'main'David Goulet2026-01-224-46/+63
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-log-ratelim: Avoid logging when there's no update Closes #2320 See merge request tpo/core/arti!3603
| * | | | | tor-log-ratelim: don't log "now working" repeatedlySteven Engler2026-01-202-22/+27
| | | | | |
| * | | | | tor-log-ratelim: added field name to tuple structSteven Engler2026-01-201-8/+13
| | | | | |
| * | | | | tor-log-ratelim: avoid logging when there's no updateSteven Engler2026-01-204-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new `AppearsResolved` status to indicate that there have been successes and no failures. The `Dormant` status now means that there has been no activity.
| * | | | | tor-log-ratelim: ran cargo fmtSteven Engler2026-01-201-16/+17
| | | | | |
| * | | | | tor-log-ratelim: change if statement to matchSteven Engler2026-01-201-3/+4
| | | | | |
* | | | | | Merge branch 'ticket1599_03' into 'main'David Goulet2026-01-2219-311/+991
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | proto: Implement relay responder handshake and finalize it for both handshakes See merge request tpo/core/arti!3596
| * | | | | | proto: Improve some comments in relay moduleDavid Goulet2026-01-222-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Enforce condition with type systemDavid Goulet2026-01-221-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commits returns either Some(AUTH_CELL, CERTS) or None. We future proof ourselves against one Some and other None even if an error check is done before. Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Fix the link auth handling from the AUTH_CHALLENGEDavid Goulet2026-01-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Add missing use for testsDavid Goulet2026-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Use the channel codec channel typeDavid Goulet2026-01-226-21/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the channel type from Unverified and Verified channels and instead use the channel type in the underlying channel codec. The codec requires such type in order to restrict messages sets. Instead of duplicating it, this commit simply makes it that there is now only a single channel type attached to a channel structure. The resulting `struct Channel` in the end gets it copied from the channel codec as the framed_tls gets split and given to the `Reactor`. Down the line, we need a channel type attached to the `Channel` in order to know if it is a client or not and authenticated or not. Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Improve comments on build_auth_data() about clog/slogDavid Goulet2026-01-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Remove Option<> around peer_ip for build_netinfo_cell()David Goulet2026-01-222-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Improve comment for handle_incoming()David Goulet2026-01-221-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Put rsa_id and rsa_cert_digest togetherDavid Goulet2026-01-222-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid having one None and the other Some which would be a bug. Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Avoid magic hardcoded value for LINK_AUTHDavid Goulet2026-01-222-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, use the static AUTHTYPE_ED25519_SHA256_RFC5705 value which is for now the only version we support. Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Enforce CERTS and AUTHENTICATE are always expected togetherDavid Goulet2026-01-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Responder receiving cells from the Initiator, if it gets a CERTS, an AUTHENTICATE must also be present (and vice-versa). Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Remove async for VerifiableChannel::check()David Goulet2026-01-224-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Move cell sending out of check() and into finish()David Goulet2026-01-222-37/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is so check() only authenticate a channel. The finish() function now only sends back the missing cells and build the final Channel. To pull this off, the AUTHENTICATE cell and our IP addresses need to be copied into the VerifiedRelayChannel. This allows us to remove complexity into the check() function as well and future commit will remove the async. Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Remove uneeded code in the unverified inner check()David Goulet2026-01-221-25/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't get into the UnverifiedChannel::check() without wanting to verify our identities and authenticate. This validation has moved before calling check() for the relay channel type. Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Implement FinalizableChannel for an unverified relay channelDavid Goulet2026-01-222-33/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for this is so we can use the type system to enforce that a client/bridge<-> relay channel can never become verified and thus in the code path of authentication. In other words, when check() is called, without an authentication cell, we can't authenticate or even verify the identities so we immediately return "self" which in this case is the UnverifiedRelayChannel. That channel can be finish()-ed to yield a Channel that can never be considered authenticated. Signed-off-by: David Goulet <[email protected]>
| * | | | | | proto: Send relay channel NETINFO in check()David Goulet2026-01-223-34/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once channel is verified and authenticate if need be, send the NETINFO. We require our advertised IP addresses for this so pass them to launch() as well to the UnverifiedRelayChannel. A cargo fmt change slipped in here, sorry about that. Signed-off-by: David Goulet <[email protected]>