Nick Mathewson
99e0b1d9f5
Remove a couple of #[allow]s.
2020-11-20 15:30:32 -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
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
658996dae9
Netdir: improve representation
...
Now a netdir no longer holds unwanted microdescs, and it always
holds a weight function.
2020-11-17 14:14:17 -05:00
Nick Mathewson
9d49988c66
Netdir: add functions to add mds, and list missing mds
2020-11-17 13:40:00 -05:00
Nick Mathewson
3668f65c9e
Netdir: only expose a netdir object if we have enough directory info
...
The calculation isn't completely right here, but it's a fair
stopgap.
2020-11-17 13:26:46 -05:00
Nick Mathewson
0d06dedd17
Include a list of fallback directories in tor-netdir
2020-11-16 16:46:08 -05:00
Nick Mathewson
6f68f99f4e
Checkpoint work on a sqlite backend.
...
Among other stuff, revert parts of previous commit that introduced a
ReadableStore abstraction: there isn't a good abstraction hat covers
both Tor legacy stores and sqlite stores-- or if there is, I'll have
to find it organizally.
This isn't a final version: it probably has bugs, and it needs
documentation and more tests. But before I do those, I want to
sanity-check the API by drafting the next layer up on the stack.
2020-11-16 09:22:27 -05:00
Nick Mathewson
4512d7e9ed
Have the consensus-parsing code expose the signed piece of the consensus.
2020-11-16 08:55:31 -05:00
Nick Mathewson
7336eeeb61
Checkpoint work on making storage backend generic
...
Also uses mmap for loading stuff.
2020-11-14 10:32:17 -05:00
Nick Mathewson
4d24fff9c0
Upgrade dependencies
2020-11-10 12:27:10 -05:00
Nick Mathewson
7d5829b0a8
netdir: remove interior mutability.
2020-11-04 11:32:12 -05:00
Nick Mathewson
d9dafa0a28
Add a new circuit-manager crate and move path selection there.
2020-11-02 10:44:31 -05:00
Nick Mathewson
b93e4b76c8
Remove a bunch of dbg! calls.
2020-10-26 14:33:14 -04:00
Nick Mathewson
d3b71bc177
More documentation in tor-netdoc.
2020-10-26 11:51:53 -04:00
Nick Mathewson
57637f3644
netdir: don't use relays with NoEdConsensus flag set.
2020-10-19 09:31:36 -04:00
Nick Mathewson
295a791a82
Improvements to Relay type in tor-netdir.
...
Now, a Relay is always valid. This required some changes to the
API: all_relays() has to return a new UncheckedRelay type that might
or might not be valid, and the functions on Relay and ChanTarget
that return ed25519 identities need to return an Ed25519Identity,
not an ed25519::PublicKey.
This change required some new encoding/decoding/conversion functions
on Ed25519Identity.
2020-10-19 09:22:49 -04:00
Nick Mathewson
353a4bfb87
Cleanup from prop315 implementation.
...
Most of the fixes here are just removing comments that said "this
isn't technically required but I'm going to pretend it is".
I also made the "protocols" field in microdescs out of its Option<>,
since we're now requiring that.
2020-10-16 16:36:51 -04:00
Nick Mathewson
3408c9ad26
Run "cargo upgrade".
2020-10-15 13:32:02 -04:00
Nick Mathewson
6f75b82ef3
Use Ed25519Identity in microdescriptors.
2020-10-15 12:42:09 -04:00
Nick Mathewson
a1855699ef
Test the pick_weighted function in tor-netdir
2020-10-10 17:36:15 -04:00
Nick Mathewson
2247664abe
Remove a couple of allow(unused) notations
2020-10-09 16:47:59 -04:00
Nick Mathewson
788e0347cb
Move around the modules inside tor-netdoc.
...
This change just gives them a more logical breakdown into parsing,
documents, and misc other types.
2020-09-29 09:05:17 -04:00
Nick Mathewson
98ab84e774
Rename remaining get_ accessors
2020-09-28 16:13:14 -04:00
Nick Mathewson
05da5a7f73
Rename some identifiers in tor-linkspec.
...
By convention, rust accessor functions don't start with 'get'.
2020-09-28 15:29:39 -04:00
Nick Mathewson
3b3a6736f6
Rename ExtendTarget to CircTarget.
2020-09-28 15:22:24 -04:00
Nick Mathewson
397d753e4e
Fix a few clippy issues
2020-09-27 03:30:09 -04:00
Nick Mathewson
f945af0c41
Document private members in most crates
2020-09-24 19:25:37 -04:00
Nick Mathewson
d4281b110e
Add documentation for tor-netdir crate
2020-09-13 08:27:55 -04:00
Nick Mathewson
ee9b871bc5
Make client-demo launch a request to www.torproject.org:80
2020-09-12 21:32:00 -04:00
Nick Mathewson
02fc8b2528
Implement extend2/extended2 handshake.
...
This is not a production-ready implementation: it will break if a
circuit is used for anything while an extend is pending.
Client-demo can now build 3-hop circuits.
2020-09-12 20:48:07 -04:00
Nick Mathewson
ee71abe560
Pare down and sort dependencies
2020-09-09 19:17:49 -04:00
Nick Mathewson
9f30b47cb7
Run cargo upgrade, except for stream-cipher.
2020-09-09 19:06:00 -04:00
Nick Mathewson
85bcf9f31b
netdir: downgrade a log
2020-09-09 11:11:29 -04:00
Nick Mathewson
1f5d758dc3
netdir: look in right path for cached-microdescs.new
2020-09-09 10:55:34 -04:00
Nick Mathewson
875e932898
New "linkspec" module to encapsulate info needed to connect/extend.
2020-09-08 20:43:15 -04:00
Nick Mathewson
0fc85598d1
rename weightfn variants
2020-09-08 19:57:12 -04:00
Nick Mathewson
48b9510caa
Add a handy function for picking a random relay.
2020-09-08 17:50:08 -04:00
Nick Mathewson
8768222acb
Start on accessors for relay weight.
2020-09-08 17:20:46 -04:00
Nick Mathewson
e40a63c013
netdir: add the ability to add authorities from a chutney directory.
2020-09-08 14:34:43 -04:00
Nick Mathewson
92830810d5
netdir: Add an extra day's tolerance to consensus timeouts
2020-09-08 14:05:22 -04:00
Nick Mathewson
e31652afe1
Bugfix: parse ed25519 ids right in mds
2020-09-08 13:30:16 -04:00
Nick Mathewson
b5ad25e0d4
Netdir: a few more accessors
2020-09-08 12:56:45 -04:00