summaryrefslogtreecommitdiff
path: root/tor-circmgr/src
Commit message (Collapse)AuthorAgeFilesLines
...
* More logging in circmgr.Nick Mathewson2021-01-261-5/+25
|
* 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
|
* 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-141-5/+7
|
* 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.
* 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
|
* Add a function to retire circuits.Nick Mathewson2020-11-241-0/+29
|
* Add support for using fallback directories in path constructionNick Mathewson2020-11-195-37/+74
| | | | | | This is mainly a refactoring commit, with a little new code. It also adds #[derive(Copy,Clone)] for a few types.
* Add a notion of a one-hop fallback path.Nick Mathewson2020-11-171-7/+11
| | | | These have a FallbackDirectory as target, rather than a Relay.
* Refactor first-hop handling types a bitNick Mathewson2020-11-171-7/+13
| | | | | | This lets us have the notion of "get the first hop of a path as some kind of a chantarget", which will make it easier to write other path types.
* Note an unpleasantness in the circmgr api.Nick Mathewson2020-11-161-0/+1
|
* Move closed-check for circuits into an atomicbool.Nick Mathewson2020-11-131-1/+1
|
* Make Arc<>-ness of ClientCirc explicit.Nick Mathewson2020-11-122-11/+15
|
* Make the Arc-ness of channels more explicit.Nick Mathewson2020-11-121-1/+2
| | | | | | Previously every channel was a secret Arc<>, which I think is bad style, and which stopped us from using weak references in other places.
* tor-circmgr: timeout and retry support.Nick Mathewson2020-11-112-3/+40
|
* Isolate async_std usage in a new tor_rtcompat crate.Nick Mathewson2020-11-112-16/+6
| | | | | Like tor_llcrypto, this crate is meant to expose only the part of other crates (in this case, a async runtime crate) that we use.
* Use anyhow in tor-circmgr and tor-chanmgrNick Mathewson2020-11-114-20/+4
|
* circmgr: Make sure circmgr can be shared among threadsNick Mathewson2020-11-041-8/+6
|
* Make 'netdir' no longer a field in circmgr.Nick Mathewson2020-11-021-12/+13
|
* Add a tiny bit of cleanup logic to tor-circmgrNick Mathewson2020-11-021-4/+17
|
* Document tor-circmgrNick Mathewson2020-11-025-7/+107
|
* Implement rudimentary circuit-manager functionalityNick Mathewson2020-11-023-1/+193
| | | | | This code is meant to "get or launch a circuit as appropriate." It's super dodgy, but it is probably good enough for a first pass.
* Add a new circuit-manager crate and move path selection there.Nick Mathewson2020-11-025-0/+182