summaryrefslogtreecommitdiff
path: root/crates/arti-relay/src/relay.rs
Commit message (Collapse)AuthorAgeFilesLines
* proto: Make the CreateRequestHandler::new() take the ntor keysDavid Goulet2026-04-211-2/+8
| | | | Signed-off-by: David Goulet <[email protected]>
* arti-relays: Pass a CreateRequestHandler to the crypto task (fmt)Gabriela Moldovan2026-04-091-3/+8
|
* arti-relays: Pass a CreateRequestHandler to the crypto taskGabriela Moldovan2026-04-091-1/+2
| | | | This will need to be updated each time the ntor keys change.
* relay: Pass advertise SocketAddr to channel builder instead of IpAddrDavid Goulet2026-04-091-1/+1
| | | | | | | | | | This trickles down to the tor-proto channel handshake code. But, the real need is in the channel builder in order to validate the outbound channel target. Fixes #2440 Signed-off-by: David Goulet <[email protected]>
* arti-relay: add support for a `CreateRequestHandler`Steven Engler2026-04-081-1/+53
|
* proto: Rename RelayIdentities to RelayChannelAuthMaterialDavid Goulet2026-03-301-5/+5
| | | | | | | | | | | | This object contains a melting pot of public keys, private keys and certificates. Rename it to reflect that it is channel authentication material and not "identities. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374454 Signed-off-by: David Goulet <[email protected]>
* relay: Make the crypto tasks use the runtime wallclockDavid Goulet2026-03-171-1/+1
| | | | | | This way we can unit tests properly. Signed-off-by: David Goulet <[email protected]>
* Fix windows cargo warningsTobias Stoeckmann2026-03-151-1/+3
| | | | Disable use-statements which are only needed for unix.
* arti-relay: Log relay identitiesSteven Engler2026-03-121-0/+5
|
* tor-basic-utils: move `iter_join` from arti-relaySteven Engler2026-03-031-1/+2
| | | | Will clean this up in the following commit.
* chanmgr: Responder relay channel now use the builder my_addrsDavid Goulet2026-02-241-15/+3
| | | | | | No need to pass from the arti relay binary our addresses when handling an incoming channel, use the one in the channel builder that an initiator channel uses.
* relay: Set ChanMgr with our addressesDavid Goulet2026-02-241-2/+3
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Update ChanMgr on key rotationDavid Goulet2026-02-241-1/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* arti-relay: fix stale commentSteven Engler2026-02-231-1/+1
| | | | This method was renamed previously.
* relay: Get rid of start_task() for readabilityDavid Goulet2026-02-231-5/+9
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Generate relay identities at initDavid Goulet2026-02-231-4/+12
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Remove unused ephemeral keystoreDavid Goulet2026-02-231-5/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Move try_generate_keys() into crypto taskDavid Goulet2026-02-231-34/+2
| | | | | | | Move rotating keys into a function so we can use it in try_generate_keys() that is used at startup. Signed-off-by: David Goulet <[email protected]>
* relay: Add a crypto task for key rotationDavid Goulet2026-02-231-1/+7
| | | | | | | | | | | | | This task crypto module has a rotate key task that is in charge of rotating keys from our KeyMgr based on the valid until. To do so, we add a RotatableKeySpec trait to help us specify our to rotate a specific key. Allows us to have a generic rotate/generate function for all our keys. Task runs every 60 seconds. Taken from C-tor. Signed-off-by: David Goulet <[email protected]>
* relay: Add a TLS acceptor in the ChanBuilderDavid Goulet2026-02-091-7/+10
| | | | | | | | | | | | | | | This requires the `TlsKeyAndCert` so be passed on the TLS acceptor settings. We assume that `RelayIdentities` has this information. The ChanBuilder::new() was getting a bit too convoluted and feature gated to instead we introduce new_client() and new_relay() and remove the need for `with_identities()`. Because of this, the ChanMgr::new() now returns a `Result<>`. Related to #1597 Signed-off-by: David Goulet <[email protected]>
* arti-relay: launch the client's background tasksSteven Engler2026-02-031-6/+19
|
* arti-relay: rename 'bootstrap()' method to 'init()'Steven Engler2026-02-031-6/+7
| | | | This method won't really be used for bootstrapping anymore.
* arti-relay: move code into a "client" objectSteven Engler2026-02-031-64/+17
|
* relay: Pass advertised addresses to the channel handlerDavid Goulet2026-01-221-3/+15
| | | | | | | | | | | We need the advertised addresses for the NETINFO cell when opening a relay channel. Keep them in the TorRelay object so we can pass them to the ChanMgr channel handler. This will also help with config reload where only the local values in TorRelay will need to be updated. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Introduce a ChanMgrConfig structDavid Goulet2026-01-131-2/+2
| | | | | | | | | | | | This struct is used to pass configuration parameters to the ChanMgr when building it. At the moment, it holds the ChannelConfig and RelayIdentities (feature gated) which will be used in subsequent commits. Note that relays do require RelayIdentities to build channels. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Remove KeyMgr from constructorDavid Goulet2026-01-131-1/+0
| | | | | | | We'll rely on a RelayIdentities to pass in the right keys to the ChanMgr instead of the entire KeyMgr. Signed-off-by: David Goulet <[email protected]>
* arti-relay: added more commentsSteven Engler2025-12-181-0/+7
|
* arti-relay: some small cleanupSteven Engler2025-12-171-4/+6
|
* arti-relay: add a `GuardMgr`, `CircMgr`, and `DirMgr`Steven Engler2025-12-171-1/+78
|
* arti,arti-relay: change info keystore path msg to debugSteven Engler2025-12-111-2/+5
|
* arti-relay: listen at configured OR portsSteven Engler2025-11-121-13/+55
|
* 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: update some comments from past few commitsSteven Engler2025-11-111-1/+3
|
* arti-relay: add OR port listener taskSteven Engler2025-11-051-2/+22
| | | | | This does not yet get the OR port from the config, and the channel manager doesn't yet do anything with the incoming connection.
* arti-relay: add error context to house keeping taskSteven Engler2025-11-051-5/+11
|
* arti-relay: use `Void` for `TorRelay::run`Steven Engler2025-10-271-7/+10
|
* arti-relay: add line breaks between `InertTorRelay` fieldsSteven Engler2025-10-211-0/+5
|
* arti-relay: add a `MemoryQuotaTracker`Steven Engler2025-10-211-3/+12
|
* arti-relay: small refactoringSteven Engler2025-10-211-7/+6
|
* arti-relay: generate keys only when bootstrappingSteven Engler2025-10-211-3/+3
| | | | | We don't want to create new files just when creating a `InertTorRelay`. We should only generate the keys before bootstrapping.
* arti-relay: copy `state_mgr.try_lock()` from arti-clientSteven Engler2025-10-211-1/+8
|
* arti-relay: small change to `create_keymgr()`Steven Engler2025-10-211-15/+8
|
* arti-relay: initialize the `StateDirectory` and `FsStateMgr`Steven Engler2025-10-211-1/+27
|
* relay: Implement a blocking run() that starts the relayDavid Goulet2025-10-211-8/+28
| | | | | | | | | | | | | | | | We have bootstrap() to prepare everything we need before starting the relay which yields a TorRelay. This commit then adds a run() function which starts the relay by launching background task. At the moment, we only have one task and it is the channel expiry one. The relay blocks on the task handle set until one task is on error or stops which leads to shutting down the relay. Part of #2217 Signed-off-by: David Goulet <[email protected]>
* arti-relay: refactor error handlingSteven Engler2025-10-201-20/+23
| | | | | | | We decided to move away from the `Error` + `ErrorDetail` all-encompassing enum design, and will use `anyhow::Error` in more places. When we need to handle specific errors, we will create smaller more-specific error types in those cases.
* arti-relay: expand comment on `InertTorRelay`Steven Engler2025-10-081-0/+17
|
* arti-relay: change `allow` to `expect`Steven Engler2025-10-081-5/+4
| | | | And remove one that we didn't need.
* arti-relay: add a new `TorRelay`Steven Engler2025-10-081-0/+48
|
* arti-relay: store the `TorRelayConfig` in the `InertTorRelay`Steven Engler2025-10-081-2/+5
|