Commit Graph

128 Commits

Author SHA1 Message Date
Nick Mathewson 7e843de2c8 Upgrade a few dependencies. 2021-01-13 08:14:28 -05:00
Nick Mathewson f01d641ec8 cargo upgrade. 2020-12-30 15:59:33 -05:00
Nick Mathewson 87cb44a4e5 Basic test for tor-dirclient::util 2020-12-21 11:57:10 -05:00
Nick Mathewson ccd6cbf627 upgrade to latest anyhow 2020-12-21 10:21:24 -05:00
Nick Mathewson 5057cbc12f Cargo-upgrade a few dependencies 2020-12-21 10:18:41 -05:00
Nick Mathewson 0222477cf8 Run cargo fmt 2020-12-17 16:04:37 -05:00
Nick Mathewson 8b5630e6b1 Merge branch 'mr_1_squashed' into main 2020-12-17 16:04:27 -05:00
owen66 18915e84d4 Fixup! issue #34: adding support for xz2 2020-12-10 20:17:04 +00:00
George Kadianakis cc91b3ce2b Use anyhow crate to add extra context for various dirclient errors. 2020-12-10 17:36:18 +02:00
Nick Mathewson 90fc798646 Fix some rustdoc warnings. 2020-12-09 09:46:39 -05:00
Nick Mathewson 17c84fd59e upgrade to require latest anyhow. 2020-12-08 17:26:19 -05:00
Nick Mathewson 8d6087426e De-parameterize ChanMgr and everything that wraps it.
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.
2020-12-08 16:29:18 -05:00
Nick Mathewson 5fc116ad7a Tolerate attempt to write a non-UTF-8 HTTP header.
previously, we would panic.
2020-12-07 21:22:12 -05:00
Nick Mathewson a52585d9d6 Mark some XXXX issues as XXXX-A1. 2020-12-07 16:07:59 -05:00
Nick Mathewson 58869194f6 tor-dirclient: tweak so that its future is Send. 2020-12-04 13:16:52 -05:00
Nick Mathewson 4aa61322be Fix a couple of clippy warnings in tor-dirclient. 2020-12-02 13:43:45 -05:00
Nick Mathewson a72437a1c7 Abandon directory circuits on most kinds of directory failure.
(There are more cases that this _doesn't_ handle, but it's a start
for now.)
2020-12-02 09:46:35 -05:00
owen66 c9a202c7ac issue #34: adding support for xz2 2020-12-02 01:20:24 +00: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 483fb1f7c4 Implement a maximum length for directory responses 2020-11-25 11:45:00 -05:00
Nick Mathewson 679104a516 Extract another function in tor-dirclient 2020-11-25 11:23:51 -05:00
Nick Mathewson 995f136ec1 Better error types for tor-dirclient 2020-11-25 11:11:40 -05:00
Nick Mathewson aee76da70f tor-dirclient: add support for partial documents.
Some requests are still useful when we get only a partial response
-- like those where we're asking for a bunch of documents at once.
For those, we should return any nonempty partial result.
2020-11-25 10:53:01 -05:00
Nick Mathewson 8a9654ee90 missing docs in tor-dirclient 2020-11-23 08:51:18 -05:00
Nick Mathewson 5d32d69011 Require (and write) docs in tor-dirclient. 2020-11-20 19:11:28 -05:00
Nick Mathewson 9f4230fb1b Initial pass on directory-manager code.
This code can now bootstrap from the network, cache the results, and
reload from cache.

There's lots more work to do here, including a big pile of tidying
and refactoring and testing and documentation.
2020-11-19 19:11:10 -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 33f070e7b5 Start a directory client implementation
It can send a GET request on a circuit, get an answer, and
decompress it with zlib.

It will need documentation and tests eventually, as well as serious
refactoring.
2020-11-16 16:39:16 -05:00