summaryrefslogtreecommitdiff
path: root/crates/tor-ptmgr/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Use ErrorReport for errors in error! in tor-ptmgrIan Jackson2023-01-301-1/+2
|
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* ptmgr: Add more logs when looking/creating a PT.Nick Mathewson2023-01-061-24/+46
| | | | | | | These are also based on temporary logs that I added locally while I was hunting bugs. Also part of #677.
* Hang onto a PT object after it is launchedNick Mathewson2022-11-301-0/+1
| | | | | | | If we don't do this, then snowflake's stdin will get closed and it will exit immediately. Found while investigating #333.
* ptmgr todo: Remove dead code allowIan Jackson2022-11-301-2/+0
|
* ptmgr: No need for state_dir in PtMgrIan Jackson2022-11-301-4/+1
| | | | This is used exclusively by the reactor.
* ptmgr todo: Tolerate exposing the Vec for nowIan Jackson2022-11-301-1/+1
| | | | | We may want to change this later, but this API is in a low level crate, so this isn't a blocker.
* Merge branch 'no_empty_select' into 'main'eta2022-11-301-1/+9
|\ | | | | | | | | | | | | ptmgr: Do not construct an empty select_all future. Closes #672 and #670 See merge request tpo/core/arti!907
| * ptmgr: Do not construct an empty select_all future.Nick Mathewson2022-11-301-1/+9
| | | | | | | | | | | | Closes #670. Closes #672.