aboutsummaryrefslogtreecommitdiff
path: root/tor-circmgr/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Try refactoring build.rs for testability.Nick Mathewson2021-07-195-59/+175
| | | | | | | I'm adding a local "Buildable" trait here so I can swap out Circuits for something else. This also lets me refactor Builder<> to be parameterized on TimeoutEstimator again, and lets us get rid of the first_hop() accessor on paths.
* Add a test for double_timeout.Nick Mathewson2021-07-191-0/+95
| | | | | | There is something wrong here, though. I had to rewrite wait_for() a lot back in the main branch to get this test working right. See arti#149 for details on that issue.
* tor-circbuild: use SleepProvider::now() instead of Instant::now()Nick Mathewson2021-07-191-5/+5
| | | | This should make time mockable for testing purposes.
* Add the ability to reconfigure a running ParetoEstimatorNick Mathewson2021-07-194-2/+22
|
* Monomorphize: just use the pareto timeout implementation.Nick Mathewson2021-07-191-3/+2
|
* Allow the pareto estimator to be disabled.Nick Mathewson2021-07-191-2/+15
|
* Connect the timeout estimator code to our circuit builder.Nick Mathewson2021-07-195-32/+134
| | | | | This currently leaves a bit to be desired, since the logic is kind of gnarly. I'm not sure I want to be using so many Arc<>s.
* Implement a circuit timeout estimator backend.Nick Mathewson2021-07-193-0/+998
| | | | | | | | | | | This backend uses the kludged-up^W heuristic-enhanced Pareto estimator from path-spec.txt section 2.4. See path-spec.txt for full details on the algorithm. I've tried to note with TODO-SPEC comments all the things that the spec currently leaves out. Nothing actually uses this code yet. By the time it's in use, I'd expect that many of these functions will need to have new visibilities.
* Merge remote-tracking branch 'origin/mr/38'Nick Mathewson2021-07-152-21/+224
|\
| * remove now invalid doc-commentTrinity Pointard2021-07-151-2/+0
| |
| * make isolation_group optional in SupportedCircUsageTrinity Pointard2021-07-141-13/+122
| |
| * move IsolationToken to circmgrTrinity Pointard2021-07-142-3/+28
| | | | | | | | | | document the behavior of IsolationToken::default remove From and Into impls between IsolationToken and u64
| * fix clippy lintsTrinity Pointard2021-07-131-0/+4
| |
| * implement stream isolationTrinity Pointard2021-07-132-14/+81
| |
* | Move wait_for into MockSleepProvider.Nick Mathewson2021-07-151-82/+41
| | | | | | | | | | This function is generally useful for testing functions where we want time to advance bit by bit.
* | make ipv[46]_policy take into account BadExitTrinity Pointard2021-07-101-2/+2
|/ | | | they now report an empty policy for BadExit relays
* Move responsibility for circuit construction into CircuitBuilder.Nick Mathewson2021-07-086-121/+121
| | | | | | | | | Previously this was done in functions associated with Path and OwnedPath, but this caused their method signatures to get more and more complicated. This change will also allow us to make timeout handling part of the circuit-building process.
* Allow tor-rtcompat to build with no runtimes.Nick Mathewson2021-07-011-10/+10
| | | | | | | | | | | | Thanks to cargo's version-2 feature resolver, we can require a runtime for tests only. I'm also making it so that the functions that create or fetch Runtimes only exist when one of the runtime features is enabled. For now that seems like a better solution than having those functions exist but panic. Closes #129.
* Merge remote-tracking branch 'origin/mr/34'Nick Mathewson2021-06-271-0/+2
|\
| * Add clippy warn needless pass by valueYUAN LYU2021-06-211-0/+1
| |
| * Add clippy warn needless borrowYUAN LYU2021-06-211-0/+1
| |
* | 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
|