Nick Mathewson
f6ca37cbe1
Disable a test on OSX; see arti#111
2021-04-20 15:40:36 -04:00
Nick Mathewson
572565bce2
Test for tor_dirclient::read_headers
2021-04-20 14:52:58 -04:00
Nick Mathewson
68ce1da4b0
Tests for tor_dirclient::read_and_decompress
2021-04-20 14:33:09 -04:00
Nick Mathewson
8007d719d9
Test for tor_dirclient::read_until_limited()
2021-04-20 13:51:47 -04:00
Nick Mathewson
50978dc7d2
tor-dirclient: more requests.rs tests
2021-04-20 13:32:20 -04:00
Nick Mathewson
3fc66306c5
Tests for sleep_until_wallclock.
2021-04-20 09:34:34 -04:00
Nick Mathewson
4a761f55ea
A little more testing for tor_rtcompat::mock::time.
2021-04-20 08:26:41 -04:00
Nick Mathewson
a910627e92
Add support for simulating the passage of time.
2021-04-19 20:13:12 -04:00
Nick Mathewson
5f850fad1f
Add "now" functions to SleepProvider.
2021-04-19 20:03:27 -04:00
Nick Mathewson
ec6dc417b9
rtcompat: remove an unused conversion function.
2021-04-19 10:28:41 -04:00
Nick Mathewson
fe22c329c6
Simple unit tests for tor_rtcompat: at last!
2021-04-19 10:24:13 -04:00
Nick Mathewson
a271faca3a
rtcompat: mark some outputs as must-use.
2021-04-19 10:08:18 -04:00
Nick Mathewson
b8e1234a4c
Clarify what TlsConnector doesn't validate.
2021-04-19 08:24:22 -04:00
Nick Mathewson
50f5ad9850
Flatten async_std impl module slightly.
2021-04-19 08:20:20 -04:00
Nick Mathewson
e3c51519e8
Flatten tokio TcpProvider implementation a bit.
2021-04-19 08:15:12 -04:00
Nick Mathewson
065162aff2
Add a local_addr() function for TcpListener.
2021-04-18 18:02:30 -04:00
Nick Mathewson
975374beb5
Fix some broken rustdoc links.
2021-04-18 17:55:43 -04:00
Nick Mathewson
342a98dccd
tor_rtcompat: Documentation and cleanups
2021-04-17 17:09:20 -04:00
Nick Mathewson
a774cdde80
Remove the no-longer-needed "global runtime" code.
2021-04-17 17:09:20 -04:00
Nick Mathewson
ee556eb714
Remove some cruft in tor_rtcompat::impls
2021-04-17 17:09:20 -04:00
Nick Mathewson
745a7a89f5
Remove need for async_trait in SleepProviderExt
2021-04-17 17:09:20 -04:00
Nick Mathewson
92de7c58f0
Move timer functions into an extension trait.
2021-04-17 09:37:46 -04:00
Nick Mathewson
6878fe8336
Move around the public modules in tor_rtcompat.
2021-04-17 09:21:09 -04:00
Nick Mathewson
1d07132787
Remove all non-runtime methods in tor_rtcompat.
2021-04-16 17:15:55 -04:00
Nick Mathewson
8532cef9aa
Add a "Runtime" parameter to all the manager types.
...
This is a big change, but it is a step towards our goal of removing
tor_rtcompat:: calls directly.
2021-04-16 16:12:08 -04:00
Nick Mathewson
ebcfd38b48
rtcompat: Make TLS functionality use Runtime traits.
...
Now there is nothing in principle that you couldn't access from a
Runtime implementation.
2021-04-16 15:44:36 -04:00
Nick Mathewson
e0f4c222dd
Move the "sleep()" function from task to timer.
2021-04-16 15:44:36 -04:00
Nick Mathewson
6821211e1e
Make incoming Streams of TcpStream a real type for each backend.
...
This makes things a little more complicated for AsyncStd, and a
little simpler for Tokio.
2021-04-16 15:44:20 -04:00
Nick Mathewson
5a587a55b4
Port tor_rtcompat::net to use Runtime objects.
2021-04-16 15:44:20 -04:00
Nick Mathewson
459a884f94
Port tor_rtcompat::timer to use Runtime objects.
2021-04-16 13:20:56 -04:00
Nick Mathewson
f3505cad49
Begin a refactoring of tor-rtcompat to use runtime objects.
...
So far, all traits are defined (I hope) and the task api is ported.
With time I want to have none of the current "global runtime" APIs
exposed, and just use Runtime objects instead. But that isn't just
yet.
2021-04-16 11:25:50 -04:00
Nick Mathewson
d18013c03a
rtcompat: rename traits module to impl_traits.
2021-04-16 09:47:15 -04:00
Nick Mathewson
67eec8ab91
upgrade dalek dependencies
2021-04-14 08:37:57 -04:00
Nick Mathewson
d60cf6ace6
Fix a compilation problem with async_std.
...
Thank you, CI!
2021-04-13 17:11:43 -04:00
Nick Mathewson
13d4ee888f
Replace tor-decompress with async-compression crate.
...
This lets us simplify tor-dirclient a fair bit. Closes #79 .
2021-04-13 16:27:52 -04:00
Nick Mathewson
edbd54f2fd
tor-dirclient: Use AsyncBufRead to simplify code a bit.
...
Previously we read too much data from our input, and then used the
unused portion as an initial state of a buffer for handling
subsequent data. Yuck! Instead we can just use an AsyncBufRead and
only read the parts we want.
This code takes some pains to never read too much data: I'd rather
just "read until the first CRLF" or have some kind of pushback
mechanism. But for now it's probably fine.
2021-04-13 15:45:27 -04:00
Nick Mathewson
9efe458ad6
Merge branch 'dirstate'
2021-04-13 10:49:15 -04:00
Nick Mathewson
bec5fa3e9c
Major revision on DirMgr logic -- almost a complete rewrite.
...
The big idea of this revision is to separate the code that knows
about doing downloads from the code that decides what to download.
Later, we can make a similar change for database access. With these
changes together, we can make our code much more testable, and
eventually enable more download types in parallel.
2021-04-13 10:48:52 -04:00
Nick Mathewson
421d7d14cc
Remove fallback_caches.toml, which is no longer in sync
2021-04-13 09:20:15 -04:00
Nick Mathewson
66de570b27
Merge remote-tracking branch 'origin/mr/30'
2021-04-13 09:16:40 -04:00
David Goulet
37c5ae6440
fallbackdir: New list from April 2021
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-04-12 10:12:03 -04:00
David Goulet
8bd09067cf
circmgr: Add missing rng trait to build_path()
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-04-09 08:45:09 -04:00
Nick Mathewson
48bcde631f
DocQuery: sort requests before splitting.
2021-04-09 08:03:09 -04:00
Nick Mathewson
b2d43507b0
Start moving responsibility for building requests into dirmgr
...
This will help with my planned "directory state" refactoring.
2021-04-09 08:03:09 -04:00
Nick Mathewson
1da7fccfc0
rtcompat: Add a cancellable-task-handle type.
...
The API is a bit yucky, since it has to be compatible with tokio and
async_std.
(Also, this patch fixes some async_std clippy warnings)
2021-04-09 08:01:38 -04:00
Nick Mathewson
6b805ece67
Merge branch 'mr_28_squashed'
2021-04-07 08:36:15 -04:00
David Goulet
48cbae0bc7
circmgr: Add a function to build a circuit by path
...
Public function so an application can use to build a circuit using a
custom path.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-04-07 08:36:07 -04:00
Nick Mathewson
9f44408bb9
Upgrade rsa, zstd, httpdate. Remove redundant pin-project.
2021-04-05 08:26:29 -04:00
Nick Mathewson
6cc8e5e028
Remove a few unused dependencies
2021-04-05 08:20:06 -04:00
Nick Mathewson
f664a76504
Upgrade rusqlite; remove needless usage.
2021-04-05 08:12:10 -04:00