summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/impls.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-circmgr: Remove Arc around ClientCircIan Jackson2022-01-071-2/+2
| | | | | | See the new commentary text on `ClientCirc` for the rationale. Signed-off-by: Ian Jackson <[email protected]>
* De-Arc-ify Buildable for ClientCircNeel Chauhan2022-01-061-1/+1
|
* Remove a bunch of unused RNGsNeel Chauhan2021-12-251-3/+1
|
* Allow on-the-fly changing of path_rulesNick Mathewson2021-12-071-2/+6
| | | | | | | | | | | | And now the complexity begins: when the user changes the path_rules, they not only want new circuits to obey those rules: they want _all new requests_ to be put onto circuits that obey those rules. That means that when the path rules become more restrictive, we need to retire all the circuits, and make sure that currently pending circuits aren't used for any requests. If it's any comfort, doing this was even more complicated in C tor. ;)
* Merge remote-tracking branch 'origin/mr/102'Nick Mathewson2021-10-261-1/+3
|\
| * Overhaul the way WaitFor and the MockSleepProvider worketa2021-10-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of racily advancing time forward, this commit attempts to rework how WaitFor works, such that it makes advances when all sleeper futures that have been created have been polled (by handing the MockSleepRuntime a Waker with which to wake up the WaitFor). The above described mechanics work well enough for the double timeout test, but fail in the presence of code that spawns asynchronous / background tasks that must make progress before time is advanced for the test to work properly. In order to deal with these cases, a set of APIs are introduced in order to block time from being advanced until some code has run, and a carveout added in order to permit small advances in time where required. (In some cases, code needed to be hacked up a bit in order to be made properly testable using these APIs; the `MockablePlan` trait included in here is somewhat unfortunate.) This should fix arti#149.
* | Fix a typo in a comment.Nick Mathewson2021-10-251-1/+1
|/
* Use better reporting for guard status.Nick Mathewson2021-10-131-13/+18
| | | | | | | | | | | | | The previous code would report all failures to build a circuit as failures of the guard. But of course that's not right: If we fail to extend to the second or third hop, that might or might not be the guard's fault. Now we use the "pending status" feature of the GuardMonitor type so that an early failure is attributed to the guard, but a later failure is attributed as "Indeterminate". Only a complete circuit is called a success. We use a new "GuardStatusHandle" type here so that we can report the status early if there is a timeout.
* WIPNick Mathewson2021-10-111-1/+1
|
* Integrate GuardUsability and GuardMonitor into CircuitBuilder.Nick Mathewson2021-10-101-4/+54
| | | | | | (When we're building a path with a guard, we need to tell the guard manager whether the path succeeded, and we need to wait to hear whether the guard is usable.)
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+85
This will cause some pain for now, but now is really the best time to do this kind of thing.