Nick Mathewson
412f1763de
Implement correct (?) weighting for path selection.
2020-12-02 13:51:19 -05:00
Nick Mathewson
85c287c4e4
When retiring circuits, do it by ID, not by reference.
2020-12-01 16:50:51 -05:00
Nick Mathewson
f5f2a648a3
tor-dirclient: add timeouts
...
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.
2020-12-01 08:56:25 -05:00
Nick Mathewson
a3a077419a
Fix a couple of new clippy warnings.
2020-11-28 14:20:15 -05:00
Nick Mathewson
e18b4e07cb
Upgrade a couple of dependencies
2020-11-28 14:17:42 -05:00
Nick Mathewson
cc55469307
Add a function to retire circuits.
2020-11-24 12:44:04 -05:00
Nick Mathewson
02bac5f04e
Add support for using fallback directories in path construction
...
This is mainly a refactoring commit, with a little new code.
It also adds #[derive(Copy,Clone)] for a few types.
2020-11-19 10:06:48 -05:00
Nick Mathewson
0945808e9b
Add a notion of a one-hop fallback path.
...
These have a FallbackDirectory as target, rather than a Relay.
2020-11-17 16:58:26 -05:00
Nick Mathewson
5188263429
Refactor first-hop handling types a bit
...
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.
2020-11-17 16:46:23 -05:00
Nick Mathewson
1148b2d79a
Note an unpleasantness in the circmgr api.
2020-11-16 15:07:19 -05:00
Nick Mathewson
cb59ae3933
Move closed-check for circuits into an atomicbool.
2020-11-13 09:08:15 -05:00
Nick Mathewson
6e5db3a0e7
Make Arc<>-ness of ClientCirc explicit.
2020-11-12 12:58:33 -05:00
Nick Mathewson
ac174c7666
Make the Arc-ness of channels more explicit.
...
Previously every channel was a secret Arc<>, which I think is bad
style, and which stopped us from using weak references in other
places.
2020-11-12 12:34:50 -05:00
Nick Mathewson
fabd6840ff
tor-circmgr: timeout and retry support.
2020-11-11 17:40:32 -05:00
Nick Mathewson
59e4b5631a
Isolate async_std usage in a new tor_rtcompat crate.
...
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.
2020-11-11 13:46:39 -05:00
Nick Mathewson
dc301094fd
Use anyhow in tor-circmgr and tor-chanmgr
2020-11-11 10:23:29 -05:00
Nick Mathewson
af16ec18a3
update some dependencies
2020-11-11 09:14:26 -05:00
Nick Mathewson
4d24fff9c0
Upgrade dependencies
2020-11-10 12:27:10 -05:00
Nick Mathewson
9c7ed1fdde
upgrade a few packages.
2020-11-05 16:56:29 -05:00
Nick Mathewson
6120a2ceac
circmgr: Make sure circmgr can be shared among threads
2020-11-04 11:31:39 -05:00
Nick Mathewson
7128c14f49
Make 'netdir' no longer a field in circmgr.
2020-11-02 14:25:49 -05:00
Nick Mathewson
80b70881af
Add a tiny bit of cleanup logic to tor-circmgr
2020-11-02 14:21:14 -05:00
Nick Mathewson
8ab8c52193
Document tor-circmgr
2020-11-02 14:11:31 -05:00
Nick Mathewson
7d2b2391ab
Implement rudimentary circuit-manager functionality
...
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.
2020-11-02 11:54:02 -05:00
Nick Mathewson
d9dafa0a28
Add a new circuit-manager crate and move path selection there.
2020-11-02 10:44:31 -05:00