Commit Graph

568 Commits

Author SHA1 Message Date
Nick Mathewson e979bd5cb2 tor-dirmgr: Refactor storage not to take Microdesc type.
Since all it needs is an MDDigest, that's what it should take.  This
will make it easier to test.
2020-11-30 11:11:39 -05:00
Nick Mathewson 1806135313 Add a test for sha3_dual 2020-11-30 11:00:58 -05:00
Nick Mathewson 5f446b238e Add a few more tests for tor-certs. 2020-11-30 09:48:19 -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 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 3321d72842 Document newer modules 2020-11-25 10:15:32 -05:00
Nick Mathewson ae4e075d5d Update README to mention current state. 2020-11-25 10:01:11 -05:00
Nick Mathewson 0b443665a8 A couple more tests in tor-cert 2020-11-25 09:10:49 -05:00
Nick Mathewson cc55469307 Add a function to retire circuits. 2020-11-24 12:44:04 -05:00
Nick Mathewson b9685e4efb change default socks proxy port to 9150 2020-11-24 12:27:11 -05:00
Nick Mathewson 200a7dbd26 Drop unsupported requests (like RESOLVE) 2020-11-24 12:20:13 -05:00
Nick Mathewson ce221476d5 Fetch microdescriptors in parallel. 2020-11-24 11:59:56 -05:00
Nick Mathewson 142116c031 A little better logging on bootstrap. 2020-11-24 10:57:20 -05:00
Nick Mathewson ea27328c67 Make legacy-store code disabled by default.
In the long run we might not want it at all.
2020-11-24 10:43:16 -05:00
Nick Mathewson 2fd2c27ee5 typo fix 2020-11-24 10:42:51 -05:00
Nick Mathewson 771d49d59e Reject .onion addresses for now. 2020-11-24 10:37:04 -05:00
Nick Mathewson e3d4a6e114 Turn client-demo into a mostly-good client. 2020-11-24 10:33:38 -05:00
Nick Mathewson f9d741ab36 Add a function to load a directory from cache. 2020-11-24 09:00:45 -05:00
Nick Mathewson 9749022fa2 When a consensus has enough descriptors, mark it non-pending. 2020-11-24 07:08:41 -05:00
Nick Mathewson 7af214b594 When storing consensuses, index them by the sha3 of the whole file. 2020-11-23 11:11:17 -05:00
Nick Mathewson 525f6b2bfa Document and de-warning the rest of tor-dirmgr 2020-11-23 10:41:41 -05:00
Nick Mathewson 5f361d9529 Less copying of the authority list. 2020-11-23 09:33:43 -05:00
Nick Mathewson b4831da536 A little documentation in tor-dirmgr 2020-11-23 09:23:20 -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 3d4f5f261e Require documentation in tor-rtcompat. 2020-11-20 17:24:16 -05:00
Nick Mathewson 3f89b3db7b Make "storage" module private 2020-11-20 16:29:55 -05:00
Nick Mathewson 99e0b1d9f5 Remove a couple of #[allow]s. 2020-11-20 15:30:32 -05:00
Nick Mathewson 61593e1c59 Teach DirMgr to use its own NetDir, if present, to bootstrap itself. 2020-11-20 15:11:20 -05:00
Nick Mathewson 7a78bef0d1 Add a better way to get a shared directory out of a DirMgr. 2020-11-20 15:07:38 -05:00
Nick Mathewson 48da54d8c5 Remove needless Arc<> for DirStoreHandle. And DirStoreHandle itself. 2020-11-20 14:52:59 -05:00
Nick Mathewson 999706ee8f Move a few more responsibilities into NetDirConfig.
Also start a DirMgr type.
2020-11-20 14:46:22 -05:00
Nick Mathewson 7e50c4ad3a Move storage and config logic from netdir to dirmgr. 2020-11-20 12:20:43 -05:00
Nick Mathewson 21ebb5caf3 NetDirConfig: Learn fallback directories from chutney configurations too 2020-11-20 09:48:57 -05:00
Nick Mathewson c7ee4997b5 Missing file: whoops 2020-11-20 09:18:12 -05:00
Nick Mathewson 4721e95c06 Use a builder pattern for NetDir. 2020-11-20 09:02:11 -05:00
Nick Mathewson ff821d3f31 Move NetDirConfig into its own module. 2020-11-20 08:53:34 -05:00
Nick Mathewson d3f94f48f4 Move some netdir code into submodules.
The Authority type gets its own module; so does the ability to load
from legacy storage.
2020-11-20 08:44:26 -05:00
Nick Mathewson 300c9c3fde Remove "dumpdir" example as obsolete 2020-11-20 08:08:32 -05:00
Nick Mathewson 7ecfa4c863 Remove a couple of stray dbg!() calls. 2020-11-19 19:23:34 -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 35040534ba downgrade an ok_or_else to ok_or. 2020-11-19 12:00:14 -05:00
Nick Mathewson 87fe434875 Refactor AuthCertKeyIds::cmp(). 2020-11-19 11:38:06 -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