summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rename FooRuntime to FooNativeTlsRuntime for consistency.Nick Mathewson2022-01-261-1/+1
|
* Merge branch 'ticket255' into 'main'eta2022-01-241-1/+1
|\ | | | | | | | | | | | | Refactor our Runtime implementations to allow replacement parts Closes #255 See merge request tpo/core/arti!251
| * Refactor Runtimes to use separate TLS implementations internally.Nick Mathewson2022-01-191-1/+1
| | | | | | | | | | This will make it easier to implement them using some other TLS provider as well, without having to duplicate all of our code.
* | Rename PathConfig::more_permissive_than()Nick Mathewson2022-01-201-1/+3
|/ | | | | | Since it implements a "<=" type relationship, it should be called "at_least_as_permissive_as()." Since it's a crate-private function, the long name isn't too bad.
* Merge branch 'ticket_178' into 'main'eta2022-01-101-0/+12
|\ | | | | | | | | | | | | Fix ticket 178: Don't use a NetDir until we have microdescriptors for all of our primary guards. Closes #178 See merge request tpo/core/arti!220
| * Add API to check if primary MDs are missing.Nick Mathewson2022-01-061-0/+12
| | | | | | | | | | | | | | We need this information to know if it's okay to migrate to a new NetDir, or if we need to download more information first. Part of #178.
* | 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]>
* extend lints to include 'clippy::all'Daniel Eades2021-12-281-0/+1
|
* Expand some comments about circuit expiration.Nick Mathewson2021-12-151-2/+5
| | | | | Emphasize that circuit expiration functions _decide whether to expire the circuit_, and don't expire it automatically.
* Add spawn_expiration_task function in circuit managerYuan Lyu2021-12-151-31/+2
|
* Make preemptive circuits reconfigurable.Nick Mathewson2021-12-071-19/+16
| | | | | | This required re-centralizing the configuration object for preemptive circuits, since previously the settings from it were a bit spread out over the crate.
* Make circuit_timing reconfigurable.Nick Mathewson2021-12-071-4/+2
|
* Add new configuration objects to reconfigure.Nick Mathewson2021-12-071-5/+9
| | | | | (These weren't in the codebase when I started the first version of this branch.)
* Allow on-the-fly changing of path_rulesNick Mathewson2021-12-071-5/+30
| | | | | | | | | | | | 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. ;)
* Sketch API for reconfiguration.Nick Mathewson2021-12-071-0/+19
| | | | | | | This patch doesn't actually make anything reconfigurable, but it does create an API that will tell you "you can't change the value of that!" If the API looks reasonable, I can start making it possible to change the values of individual items.
* Clarify names and docs for predictive circuits.Nick Mathewson2021-12-071-3/+3
| | | | | Also, use humantime_serde, rather than a number of seconds, to indicate configuration time.
* Rename circuits_preemptive to preemptive_circuitsNick Mathewson2021-12-071-6/+6
| | | | | | This obeys a few conventions: * adjective before noun * config objects end with "config"
* Allow configurability on preemptive circuitsNeel Chauhan2021-12-071-11/+17
|
* Merge remote-tracking branch 'origin/mr/154'Nick Mathewson2021-11-301-3/+61
|\
| * Add tests & address review commentaryeta2021-11-301-9/+10
| |
| * Actually build preemptive circuits (and minor fixes)eta2021-11-291-0/+34
| | | | | | | | | | | | The new CircMgr::build_circuits_preemptively function actually causes preemptive circuits to be built; it gets called from arti-client, like the other daemon tasks the CircMgr has.
| * Introduce PreemptiveCircuitPredictor and TargetCircUsage::Preemptiveeta2021-11-231-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for making Arti build circuits preemptively, this commit introduces `TargetCircUsage::Preemptive`, a circuit usage that works somewhat differently from other ones: it requires at least 2 circuits to exist that can exit the port it contains in order for an existing circuit to match against it (path-spec.txt § 2.1.1); if that's not the case, that usage will require building new circuits (in order that we build enough to have 2 available). This required refactoring how circuit reuse worked; now, `CircList::find_open` uses the new `AbstractSpec::find_supported` trait method, which we customize to implement the above check in the case of `Preemptive` circuit usages. To make that work, `OpenEntry` now takes two type parameters (the spec and circuit types), instead of taking a builder type parameter and using its associated types. (We also got rid of type constraints on that struct, yay!) A WIP implementation of a preemptive circuit predictor that implements path-spec.txt § 2.1.1 is also included, but this will require additional effort to wire it up with the `CircMgr` properly.
* | add semicolons if nothing returnedDaniel Eades2021-11-251-0/+1
|/
* Flatten enforce_distance into path_rules.Nick Mathewson2021-11-181-2/+2
| | | | Also use the path_rules name consistently throughout the code.
* Fold "circuit_timing" and "request_timing" into a single section.Nick Mathewson2021-11-181-4/+2
|
* Update our disclaimers and limitations sections.Nick Mathewson2021-10-271-4/+0
|
* Turn StreamIsolation into a separate type.Nick Mathewson2021-10-251-6/+3
| | | | | | | | | Now that we have two kinds of isolation tokens (those set on a stream, and those set by the stream's associated TorClient), we need a more sophisticated kind of isolation. This fixes the bug introduced with the previous commit, where per-stream tokens would override per-TorClient tokens.
* s/arti-arti-client/arti-client/ and regenerate readme filesNick Mathewson2021-10-251-1/+1
|
* Replace references to arti-client in the documentation.Nick Mathewson2021-10-211-1/+1
|
* Finish the timeout-inference side of shared state.Nick Mathewson2021-10-201-15/+5
|
* Replace the return type of StorageMgr::try_lock with a tristateNick Mathewson2021-10-201-1/+9
| | | | | It's useful to know now only if we now have the lock, but also if we just got it for the first time.
* Initial work on periodically reloading state.Nick Mathewson2021-10-191-1/+11
| | | | | We can use this in the case where we don't get the lock on the state file, because another process is running.
* Pass the guard manager down to the path selection functions.Nick Mathewson2021-10-111-0/+4
|
* Notify guard manager on network change and state flush.Nick Mathewson2021-10-101-1/+15
|
* Add a GuardMgr member to CircuitBuilderNick Mathewson2021-10-101-2/+9
|
* enable checked_conversions lint.Nick Mathewson2021-10-091-0/+1
|
* Use StorageHandle in tor_circmgr.Nick Mathewson2021-09-301-8/+9
|
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-3/+4
|
* A little more test coverage in tor-circmgr::mgrNick Mathewson2021-09-071-1/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+362
This will cause some pain for now, but now is really the best time to do this kind of thing.