aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-ptmgr/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* add TODO about Arti#2634pryty262026-08-101-0/+4
|
* Added #[cfg(...)] to remove the unnecessary #[allow(dead_code)]pryty262026-07-211-11/+21
|
* add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
|
* Removed unnecessary lintpryty262026-07-151-1/+1
| | | | Removed unnecessary lint
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | 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.
* ptmgr: Defer proxy protocol string conversionNihal2026-05-261-3/+4
|
* ptmgr: pass outbound_proxy to managed PT processesNihal2026-05-261-0/+6
| | | | | | | Previously the [channel] outbound_proxy setting was applied to Arti's own direct connections but was not forwarded to managed PT processes. https://spec.torproject.org/pt-spec/configuration-environment.html
* 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.
* relay: Add a TLS acceptor in the ChanBuilderDavid Goulet2026-02-091-1/+1
| | | | | | | | | | | | | | | 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]>
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* chanmgr: Get rid of the builder outbound_chan_typeDavid Goulet2026-01-131-3/+1
| | | | | | | | | | | | | | | | | | | Instead, we'll simply use `RelayInitiator` if the identity keys (identities) struct is set. This avoids the problem where someone could call outbound_chan_type() of the ChanMgrConfig and get the wrong channel type if with_identities() is set after. This way, a single call, `with_identities()` is what will define the outbound channel type so no chance of errors. This also removes the cfg_if {} around the builder creation in a much more simplified version. Related to #1599 Signed-off-by: David Goulet <[email protected]>
* chanmgr: Add ChannelType to channel manager configDavid Goulet2026-01-131-1/+3
| | | | | | | | | | This allows us to pass it to the ChanBuilder which will be able to use this type for the outbound channels. For now, we do this trick where if we have relay identities, we always consider that all outbound channels will be RelayInitiator. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Remove KeyMgr from constructorDavid Goulet2026-01-131-1/+1
| | | | | | | 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]>
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* all: run cargo fmtSteven Engler2025-11-041-1/+1
|
* all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-041-1/+1
|
* Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
| | | | This feature has been removed from nightly, in favor of doc_cfg.
* chanmgr: Add KeyMgr to channel builderDavid Goulet2025-08-201-1/+1
| | | | | | | This is so a relay can build authenticated channels. Several keys/cert are required for this that are within the key manager. Signed-off-by: David Goulet <[email protected]>
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-3/+9
| | | | | | | | | | | | | | 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.
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* tor-ptmgr: pass through the `CfgPathResolver`Steven Engler2024-11-181-1/+4
|
* ptmgr: Warn on non-local unmanaged PTsNick Mathewson2024-09-251-0/+7
|
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-281-2/+3
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* tor-ptmgr: added a 'managed-pts' default featureSteven Engler2024-08-211-72/+92
| | | | | This conditionally compiles most of the code related to managed transports.
* tor-ptmgr: break out `spawn_transport` into separate functionSteven Engler2024-08-201-33/+38
|
* tor-ptmgr: moved `PtClientMethod` from ipc to crate moduleSteven Engler2024-08-201-1/+23
|
* tor-ptmgr: move some code to a new 'managed' moduleSteven Engler2024-08-201-311/+11
| | | | | | Code that's related to managed transports has been moved to a new 'managed' module. This includes the PT reactor since it's not needed for unmanaged transports.
* tor-ptmgr: fix warnings when 'tor-channel-factory' isn't enabledSteven Engler2024-08-201-1/+4
|
* tor-ptmgr: added the `TransportOptions` enumSteven Engler2024-08-201-25/+22
| | | | | | | | This is a little nicer and more type-safe to work with than `TransportConfig`. It would have been nice to change `TransportConfig` directly instead, but it would slightly change arti_client's public API, and would require an extra field in the `[[bridges.transports]]` toml table.
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* tor-ptmgr: Comment fixesgabi-2502024-03-141-1/+1
|
* Move comment from factory_for_transport.Nick Mathewson2024-03-141-21/+21
|
* Clean up parts of the ptmgr docs that assume managed ptsNick Mathewson2024-03-141-2/+2
|
* Teach get_cmethod_for_transport to handle unmanaged transports.Nick Mathewson2024-03-141-3/+9
| | | | | | | This will suffice to bypass the reactor when we're dealing with an unmanaged pluggable transport. Closes #755.
* Lightly refactor get_cmethod_for_transportNick Mathewson2024-03-141-40/+41
| | | | Now that it's extracted, we can remove a mut and some nesting.
* Rename cmethods => managed_cmethodsNick Mathewson2024-03-141-7/+11
|
* Extract cmethod lookup from factory_for_transport.Nick Mathewson2024-03-141-59/+77
|
* Adapt TransportConfig to support unmanaged transports.Nick Mathewson2024-03-141-5/+17
| | | | | | | | | | | This is based on an original branch by Trinity. Instead of its original approach, which used an enum in the configuration to distinguish managed from unmanaged transports, this branch uses builder validation function to ensure that incompatible options aren't used together. Doing the lets us generate better error messages. Thanks: trinity-1686a <[email protected]>
* Rename ManagedTransportConfig to TransportConfig.Nick Mathewson2024-03-141-8/+8
| | | | We're going to start using this type for _every_ kind of transport.
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* oneshot: Apply deferred rustfmt churnIan Jackson2023-10-111-1/+1
| | | | cargo fmt, precisely.
* oneshot: Use veneer in tor-ptmgrIan Jackson2023-10-111-1/+1
|
* Add initial support for running a PT in server modeSaksham Mittal2023-08-241-10/+22
|
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Throughout: Use *_report!() macros for reporting Errors.Nick Mathewson2023-07-071-3/+3
| | | | | | | | | | | | | | | I identified the cases to replace by searching for the string `.report()`. There are a few that I didn't change: * A couple of cases that used anyhow::Error, * One case that reported two Errors. * Two cases in `tor_hsclient::err` that just did `error!("Bug: {}")`. I have also not audited the cases in `tor-hsclient` where we're using `tor_error::Report` manually. Nonetheless, closes #949.
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|