Commit Graph

30 Commits

Author SHA1 Message Date
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
Nick Mathewson a4f1b27334 Fix clippy warnings; improve key type for consensus. 2020-09-07 17:27:29 -04:00
Nick Mathewson 919a7c5970 Start on a 'netdir' crate to wrap netdoc.
For now, this assumes an existing Tor cache directory.
2020-09-07 16:53:06 -04:00