summaryrefslogtreecommitdiff
path: root/crates/tor-ptmgr/src
Commit message (Collapse)AuthorAgeFilesLines
* ptmgr: Use impl_standard_builder for TransportConfigNick Mathewson2024-04-021-1/+3
| | | | (This is !Default, since there is no default TransportConfig.)
* tor-ptmgr: Comment fixesgabi-2502024-03-142-2/+2
|
* 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-142-4/+8
|
* Teach get_cmethod_for_transport to handle unmanaged transports.Nick Mathewson2024-03-142-3/+23
| | | | | | | 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-142-8/+75
| | | | | | | | | | | 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-142-10/+10
| | | | We're going to start using this type for _every_ kind of transport.
* Merge branch 'encapsulate_config_rs' into 'main'Nick Mathewson2024-03-131-1/+1
|\ | | | | | | | | Encapsulate usage of config-rs inside tor-config. See merge request tpo/core/arti!2040
| * ptmgr: Use Itertools directly.Nick Mathewson2024-03-131-1/+1
| | | | | | | | Previously it used tor_config::Itertools, which is silly.
* | Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|/
* Use tor_basic_utils::PathExt::display_lossyIan Jackson2024-03-051-1/+2
| | | | | Change Path::display to this new function, in call sites where it's being used for a diagnostic.
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* Merge branch 'todo-not-hss' into 'main'Alexander Færøy2023-10-221-1/+1
|\ | | | | | | | | Remove an "HSS" from a "TODO HSS" comment in ptmgr See merge request tpo/core/arti!1676
| * Remove an "HSS" from a "TODO HSS" comment in ptmgrNick Mathewson2023-10-161-1/+1
| | | | | | | | This isn't actually onion service related, AFAICT.
* | tor-ptmgr: Handle unsupported escapesEmil Engler2023-10-171-1/+8
|/
* oneshot: Apply deferred rustfmt churnIan Jackson2023-10-111-1/+1
| | | | cargo fmt, precisely.
* oneshot: Use veneer in tor-ptmgrIan Jackson2023-10-111-1/+1
|
* Resolve ClientTransportLaunched and ServerTransportLaunched in different armsSaksham Mittal2023-09-131-24/+26
|
* Rename ClientTransportGaveError to TransportGaveErrorSaksham Mittal2023-09-132-4/+4
|
* Deduplicate ClientTransportLaunched and ServerTransportLaunchedSaksham Mittal2023-09-111-106/+135
| | | | | | | Note: this isn't perfect, though it moves both match arms to try_match_common_messages, it does end up resolving them separately using a helper function, and also necessitated creating another function in the PluggableTransportPrivate trait
* Deduplicate ClientTransportFailed and ServerTransportFailedSaksham Mittal2023-09-111-22/+11
|
* Import sealed module to avoid syntactic vinegarSaksham Mittal2023-09-111-14/+15
|
* tor-ptmgr: Test for empty valuesEmil Engler2023-09-071-0/+7
| | | | | | | This commit adds a unit test that checks if an empty value is parsed properly. It fixes the coverage in `crates/tor-ptmgr/src/ipc.rs:120`.
* tor-ptmgr: Test for missing valuesEmil Engler2023-09-071-0/+6
| | | | | This commit adds a test which checks for a missing value in an SMETHOD argument.
* tor-ptmgr: Test for forbidden `=`Emil Engler2023-09-071-0/+6
| | | | | This commit adds a unit test to the `tor-ptmgr` crate, which checks for forbidden `=` signs while reading a value.
* tor-ptmgr: Test argument ending with backslashEmil Engler2023-09-071-0/+6
| | | | | This commit adds a unit test to the `tor-ptmgr` crate, which checks if arguments are terminated with a backslash, which is forbidden.
* tor-ptmgr: Test unsupported octal sequencesEmil Engler2023-09-071-0/+9
| | | | | This commit adds a unit test that checks if all octal escape sequences are treated as an unsupported error.
* tor-ptmgr: Test escape sequencesEmil Engler2023-09-071-0/+8
| | | | | This commit adds a test to the `tor-ptmgr` crate, which increases the test coverage by checking for escape sequences in values.
* Add cognitive-complexity exceptions for clippy.Nick Mathewson2023-09-051-0/+2
| | | | I have no idea why these became necessary.
* Add initial support for running a PT in server modeSaksham Mittal2023-08-242-301/+642
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* tor-guardmgr: bridges: fix typo in getter docIan Jackson2023-07-211-1/+1
|
* tor-guardmgr: bridges: getter for ManagedTransportConfigBuilder.protocolsIan Jackson2023-07-201-0/+9
| | | | | It's a bit of a wart that tor-ptmgr calls these "protocols" and tor-guardmgr calls these "transport names".
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-102-0/+2
|
* Throughout: Use *_report!() macros for reporting Errors.Nick Mathewson2023-07-072-10/+6
| | | | | | | | | | | | | | | 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.
* Additional documentation around bridges/PT configurationNick Mathewson2023-07-031-2/+11
| | | | | | | This tries to flesh out some of the details for users who may be new to bridges and PTs. Closes #706.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* Use ErrorReport - run rustfmtIan Jackson2023-01-301-1/+5
| | | | Split off for ease of review and possible rebase.
* Use ErrorReport for errors in error! in tor-ptmgrIan Jackson2023-01-301-1/+2
|
* Use ErrorReport for errors in warn! in tor-ptmgrIan Jackson2023-01-301-3/+3
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* 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.
* ptmgr: Add more logging to IPC code.Nick Mathewson2023-01-061-9/+34
| | | | | | | | This is based on logs that I added locally while I was trying to debug some startup issues. Hopefully they'll make things easier the next time there's something to debug. Part of #677.
* Fix typosDimitris Apostolou2022-12-091-1/+1
|