summaryrefslogtreecommitdiff
path: root/tor-circmgr/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused import.Nick Mathewson2021-06-211-1/+0
|
* More tests and a little code-golf for coverage on tor-circmgrNick Mathewson2021-06-204-14/+47
|
* tor_circmgr: simplify build_circuit a bit.Nick Mathewson2021-06-202-15/+10
|
* A few tests for circparameters generation.Nick Mathewson2021-06-191-0/+31
|
* More/better tests on tor_circmgr::mgrNick Mathewson2021-06-191-46/+132
|
* A little testing and refactgoring in tor-circmgr.Nick Mathewson2021-06-193-25/+23
|
* Misc tests in tor-proto.Nick Mathewson2021-06-191-1/+4
|
* Fix some warnings about needless & from nightly clippyNick Mathewson2021-06-183-5/+5
|
* Run "typos" to fix a few more typos.Nick Mathewson2021-06-172-3/+3
|
* Use retry-error in tor-circmgr.Nick Mathewson2021-06-172-19/+39
|
* Suppress a clippy warning.Nick Mathewson2021-06-171-0/+1
|
* more improvements to circmgr tests.Nick Mathewson2021-06-163-2/+6
|
* Notes about badexit flag and opportunities for errorNick Mathewson2021-06-161-0/+1
|
* More tests on circmgr::path.Nick Mathewson2021-06-163-1/+89
|
* circmgr: tests for path/dirpath.rsNick Mathewson2021-06-161-0/+68
|
* Tests for circmgr::usageNick Mathewson2021-06-162-0/+103
|
* tor_circmgr: even more testsNick Mathewson2021-06-161-16/+95
|
* More tests in tor-cirmgr::mgrNick Mathewson2021-06-161-4/+128
|
* remove now-unused importsNick Mathewson2021-06-141-5/+0
|
* Comment out build_path for now.Nick Mathewson2021-06-141-0/+3
| | | | | It just duplicates TorPath::build_circuit, which is all you actually need.
* Enormous tor-circmgr rewrite.Nick Mathewson2021-06-149-431/+1656
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with the tor-chanmgr code, the circuit manager is now implemented using an AbstractCircMgr type that uses traits to abstract the particular behavior of other types that it uses. (Specifically: circuits, building circuits, and telling whether one circuit usage is compatible with another.) Abstracting out the dependencies in this ways makes it possible to test the circuit manager without having to actually build real circuits. This commit also introduces new behavior for handling pending circuit requests. Upon getting a new request, first we check to see if there's an existing circuit we can use. If there isn't, we look for pending circuits and wait for them. If there aren't any pending circuits we can use, we launch one or more, and wait for them. So far, that's the same as the old behavior. But here's a change: if, while we are waiting for some pending circuits, a different circuit is completed, and it's one we could use, then the task that was building _that_ circuit will tell us: "please look at this circuit". This gives us better changes of getting a usable circuit fast. Minor changes: * The Error type in CircMgr no longer uses anyhow; several errors have been simplified. * We've gotten more formal about the relationship between circuit usage and target usage.
* Add an XXXX to path.rsNick Mathewson2021-06-041-0/+1
|
* Missing experimental-api imports.Nick Mathewson2021-06-031-1/+3
|
* cirmgr: Move usage-related code into a submodule, and refactor.Nick Mathewson2021-06-023-137/+168
|
* Add noop_method_call warning.Nick Mathewson2021-05-271-0/+1
| | | | | | This would have saved ahf and me a lot of confusion in debugging a situation where we were cloning a reference of a type that didn't implement Clone.
* Enable cargo_common_metadata warning.Nick Mathewson2021-05-251-0/+1
|
* Module docs for remaining cratesNick Mathewson2021-05-251-3/+16
|
* Use macros and types to improve handling of Netdir parameters.Nick Mathewson2021-05-251-4/+3
| | | | (Squashed from typed-netdir-params)
* Broaden type of from_target_portsNick Mathewson2021-05-201-2/+2
|
* Refactor TorPath code to have explicit constructors.Alexander Færøy2021-05-204-26/+81
| | | | | | | | | This patch refactors the internal representation of the TorPath type to use an enum for representing its state. We add explicit constructor methods to create the different types of path's, such that client users can write code that uses different paths based on their need. This work was done together with Nick as part of the Arti hackathon.
* Add the "unreachable_pub" lint.Nick Mathewson2021-05-181-0/+1
| | | | | | This is a somewhat obnoxious change in its scope and requirements, but it makes it easier to understand what the real public and private parts of our APIs are.
* Prefer "relay" over "node" in most circumstances.Nick Mathewson2021-05-182-3/+3
|
* Resolve clippy warnings from Rust 1.52.Nick Mathewson2021-05-071-8/+4
| | | | | | | | | | Rust 1.52 just came out, and there are new clippy lints to deal with: * It spots more cases when we could use Option::map * It spots more cases when we could use Iterator::flatten * When we build a struct instance, it wants us to list the fields in the same order that the struct declares them.
* Add trait_duplication_in_bounds warning.Nick Mathewson2021-05-031-0/+1
|
* Add unseparated_literal_suffix lint, and fix it.Nick Mathewson2021-05-031-0/+1
|
* Add a few more clippy warningsNick Mathewson2021-05-031-0/+5
|
* Fix experimental-api feature after refactoringDavid Goulet2021-05-031-3/+5
| | | | | | | | | Important refactoring happened recently which broke the "experimental-api" feature. Fixes are quite simple. Signed-off-by: David Goulet <[email protected]>
* Add some more clippy warnings to our list.Nick Mathewson2021-04-271-1/+6
|
* Enforce (and obey) clippy lints about exhaustive enums, structs.Nick Mathewson2021-04-274-0/+7
| | | | | | | | These lints force us to declare our exported enums and exhaustive-looking structs as non-exhaustive (so that we can add to them in the future without breaking our API) or to explicitly disable the warning for a given enum/struct (to say that we _intend_ for additions to be a breaking change).
* Move timer functions into an extension trait.Nick Mathewson2021-04-171-7/+5
|
* Move around the public modules in tor_rtcompat.Nick Mathewson2021-04-172-2/+2
|
* Remove all non-runtime methods in tor_rtcompat.Nick Mathewson2021-04-162-6/+18
|
* Add a "Runtime" parameter to all the manager types.Nick Mathewson2021-04-162-9/+12
| | | | | This is a big change, but it is a step towards our goal of removing tor_rtcompat:: calls directly.
* circmgr: Add missing rng trait to build_path()David Goulet2021-04-091-1/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* circmgr: Add a function to build a circuit by pathDavid Goulet2021-04-071-0/+19
| | | | | | | Public function so an application can use to build a circuit using a custom path. Signed-off-by: David Goulet <[email protected]>
* Fix a bunch more new clippy lints in Rust 1.51Nick Mathewson2021-03-291-6/+6
| | | | | | | | The major types are: * You implemented Into when you should have implemented From. * You sliced a slice when you didn't have to. * You said Ok(x?) when you could have said x. * You said Vec::new(); push(); push(); when you could have said vec![].
* Use Arc::clone() explicitly with port policiesNick Mathewson2021-03-291-2/+2
|
* Don't copy exit policies around; instead use Arc.George Kadianakis2021-03-292-5/+2
|
* Use expect() instead of unwrap() in tor-circmgrNick Mathewson2021-03-041-4/+12
|
* Make authorities and fallbacks configurable.Nick Mathewson2021-02-112-4/+6
| | | | | | | | | | This commit adds configuration options for these values, with the right defaults, and uses those options instead of built-in functions to set them. We also remove the function to extract information from chutney directories: now that arti is configurable, it can be chutney's job to make its own network configurations.