summaryrefslogtreecommitdiff
path: root/tor-circmgr
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-072-0/+22
| | | | | | | 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
|
* Add a compatibility layer so we can upgrade rand_core.Nick Mathewson2021-03-181-1/+1
| | | | | | dalek-crypto is stuck on rand_core 0.5.1, so we've been stuck too. This commit introduces a compatibility module so that we can wrap new rand_core instances to make them backward compatible.
* Add the tor project as an author.Nick Mathewson2021-03-171-1/+1
|
* Add keywords to each Cargo.tomlNick Mathewson2021-03-171-0/+1
|
* Add a description field to all our Cargo.toml filesNick Mathewson2021-03-171-0/+1
|
* Give it a homepage everyplace.Nick Mathewson2021-03-171-0/+1
|
* upgrade async-traitNick Mathewson2021-03-091-1/+1
|
* Bump dependencies with "cargo upgrade"Nick Mathewson2021-03-061-1/+1
|
* Use expect() instead of unwrap() in tor-circmgrNick Mathewson2021-03-041-4/+12
|
* Port to work with tokio or async-std.Nick Mathewson2021-03-021-2/+2
| | | | | | | | | | | | | | | | | | This is fairly ugly and I think I'll need to mess around with the feature configuration a while until we get something that's pleasant to develop with. This still seems like a good idea, though, since we _will_ need to be executor-agnostic in the end, or we'll have no way to handle wasm or embedded environments. Later down the road, we'll probably want to use futures::Executor or futures::Spawn more than having global entry points in tor_rtcompat. That would probably make our feature story simpler. Tokio is the default now, since tokio seems to be more heavily used for performance-critical stuff. This patch breaks tests; the next one will fix them, albeit questionably.
* Update to latest futures, once_cellNick Mathewson2021-02-231-1/+1
|
* Update some dependencies.Nick Mathewson2021-02-191-1/+1
|
* 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.
* bump serde and logNick Mathewson2021-02-011-1/+1
|
* More logging in circmgr.Nick Mathewson2021-01-261-5/+25
|
* require latest futures crateNick Mathewson2021-01-151-1/+1
|
* Upgrade a few more dependencies.Nick Mathewson2021-01-131-1/+1
|
* Upgrade a few dependencies.Nick Mathewson2021-01-131-3/+3
|
* cargo upgrade.Nick Mathewson2020-12-301-2/+2
|
* Cleanup on DirInfo::circ_params.Nick Mathewson2020-12-221-8/+15
|
* Implement the "circwindow" and "ExtendByEd25519ID" parametersNick Mathewson2020-12-222-7/+28
| | | | | | These necessitated a little complexity for our circuit creation/extension API; we might want to refactor that down the road.
* Check ipv6 exit policies when trying to connect to an ipv6 port specificallyNick Mathewson2020-12-222-1/+10
|
* upgrade to latest anyhowNick Mathewson2020-12-211-1/+1
|
* Simplification: Every relay is in the same family as itself.Nick Mathewson2020-12-171-7/+2
|
* Make sure that a circuit doesn't use relays in the same familyLunar2020-12-161-3/+7
| | | | | | | | | | | | | We implement `Relay::in_same_family` which is in turn used by `ExitPathBuilder::pick_path` to avoid picking relays in the same family. Compared to the original C implementation, we are missing support for options EnforceDistinctSubnets and NodeFamilySets. This has only been very lightly tested so far. Closes: #43
* Write a few misc unit testsNick Mathewson2020-12-151-1/+1
|
* Basic support for IPv6 and begin flags.Nick Mathewson2020-12-152-14/+21
| | | | | | We now have a way to tell a circuitmgr whether we require ipv4/ipv6 support for a target address in an exit policy, and we use similar logic to set begin flags.
* Implement a notion of "circuit dirtiness", as in Tor.Nick Mathewson2020-12-151-6/+33
|
* Fix some clippy warnings.Nick Mathewson2020-12-151-3/+7
|
* circmgr: refactor and bugfix a bit.Nick Mathewson2020-12-141-28/+83
| | | | | | | | Notably, turn the hashmap into its own type. This will help with other refactoring and fixes in the future. Also notably, fix the code we use when a pending circuit is complete. There's still a design flaw there though.
* tor-circmgr: update documentationNick Mathewson2020-12-142-2/+23
|
* Give more information if we fail to create a pending circuit.Nick Mathewson2020-12-142-5/+8
|
* Remove now-unused busted From<TargetCircUsage> for CircUsageNick Mathewson2020-12-141-19/+0
|
* tor-circmgr: always remove closed circuits from the list.Nick Mathewson2020-12-141-8/+8
|
* tor-circmgr: Use a better key type for our circuit map.Nick Mathewson2020-12-141-70/+88
| | | | | | | We now use the unique id of each non-pending circuit as its key in the map. I wish I could do this without copying, but I don't see a great way to do that while keeping the pending entries in the same map for now.
* Remember the actual usable ports for an exit after we've built a circuitNick Mathewson2020-12-143-52/+154
| | | | | | | | Previously we'd just remember the port that we _wanted_ a circuit for, and forget all the ports that it _could_ support. This is part of a bigger circmgr revision/refactoring pass; there should be cleanups before I merge this.
* upgrade to require latest anyhow.Nick Mathewson2020-12-081-1/+1
|
* De-parameterize ChanMgr and everything that wraps it.Nick Mathewson2020-12-082-21/+6
| | | | | | | | | | | | | | This makes a whole lot of our code simpler, and makes it so that CircMgr and DirMgr no longer need to have anything parameterized over transports, either. Instead of boxing Transport inside of ChanMgr, I've made a new Connection trait that goes from a ChanTarget* straight to a Channel. This lets us avoid having to box the intermediate TLS object. [*] Actually, a copy of the information from a ChanTarget. Ick, but I had to make a copy to avoid parameterizing Connecter::build_channel.
* Mark some XXXX issues as XXXX-A1.Nick Mathewson2020-12-073-8/+5
|
* Fix typo in pick_path().Alexander Færøy2020-12-051-1/+1
| | | | | | This patch fixes a minor typo in the error case when looking for a middle relay for a 3-hop circuit where the error message should say "No middle relay found" and not "No exit relay found".
* Implement correct (?) weighting for path selection.Nick Mathewson2020-12-022-21/+7
|
* When retiring circuits, do it by ID, not by reference.Nick Mathewson2020-12-011-8/+8
|
* tor-dirclient: add timeoutsNick Mathewson2020-12-011-2/+2
| | | | | | | | This adds two timeouts in total: one for sending begin, and getting headers, and one for getting the rest of the data. These timeouts are way too long right now, but at least the code is there.
* Fix a couple of new clippy warnings.Nick Mathewson2020-11-281-1/+1
|
* Upgrade a couple of dependenciesNick Mathewson2020-11-281-1/+1
|