aboutsummaryrefslogtreecommitdiff
path: root/tor-netdoc/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Enforce (and obey) clippy lints about exhaustive enums, structs.Nick Mathewson2021-04-277-1/+12
| | | | | | | | These lints force us to declare our exported enums and exhaustive-looking structs as non-exhaustive (so that we can add to them in the future without breaking our API) or to explicitly disable the warning for a given enum/struct (to say that we _intend_ for additions to be a breaking change).
* cargo fix --edition-idiomsNick Mathewson2021-04-261-1/+1
|
* Major revision on DirMgr logic -- almost a complete rewrite.Nick Mathewson2021-04-131-0/+13
| | | | | | | | 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.
* DirMgr: add text() and texts() functions to ask for document textNick Mathewson2021-03-312-3/+3
| | | | | Also, start on a larger refactoring where we ask for documents by their ID.
* Make ConsensusFlavor a real type.Nick Mathewson2021-03-312-27/+58
| | | | Previously we were "stringly typing" this field. Now it's time to stop.
* Move RdDigest to routerdesc.rsNick Mathewson2021-03-303-7/+4
|
* dir: Add server descriptor directory requestDavid Goulet2021-03-301-0/+3
| | | | Signed-off-by: David Goulet <[email protected]>
* rs: Add getters to router status objectsDavid Goulet2021-03-301-0/+12
| | | | Signed-off-by: David Goulet <[email protected]>
* Make RouterFlags public.Nick Mathewson2021-03-301-4/+11
|
* Add an accessor for the members of a relay family.Nick Mathewson2021-03-301-0/+6
|
* Add a missing member documentationNick Mathewson2021-03-301-0/+8
|
* Add a test case for NS consensus parsing.Nick Mathewson2021-03-301-1/+29
|
* NS consensus documents have signatures on SHA1 hashes, not SHA256.Nick Mathewson2021-03-301-8/+29
|
* Implement parsing for ns-flavored consensus documents.Nick Mathewson2021-03-303-202/+317
|
* Make RouterStatus a trait and Consensus into a generic type.Nick Mathewson2021-03-303-55/+132
| | | | This breaks surprisingly little.
* Start moving MdConsensus-specific code to a submodule.Nick Mathewson2021-03-302-172/+189
| | | | This is part of refactoring to handle NsConsensuses.
* Resolve rustdoc warnings.Nick Mathewson2021-03-291-3/+3
|
* Fix a bunch more new clippy lints in Rust 1.51Nick Mathewson2021-03-294-17/+16
| | | | | | | | The major types are: * You implemented Into when you should have implemented From. * You sliced a slice when you didn't have to. * You said Ok(x?) when you could have said x. * You said Vec::new(); push(); push(); when you could have said vec![].
* Fix Rust-1.51 clippy warnings about acronyms in camel case.Nick Mathewson2021-03-297-169/+175
| | | | This is painful, but we shouldn't have to do it again.
* Rename Rsa{Identity,Signature} to fix clippy warning.Nick Mathewson2021-03-295-54/+54
|
* Add an intern.rs module that I forgot.Nick Mathewson2021-03-291-0/+54
|
* Use interned PortPolicy objects in RouterDescs too.Nick Mathewson2021-03-291-2/+3
|
* Netdoc: Add support for interned PortPolicy objects in MicroDescsNick Mathewson2021-03-294-4/+17
| | | | In C tor, this saved a whole lot of RAM.
* Don't copy exit policies around; instead use Arc.George Kadianakis2021-03-291-6/+7
|
* Add support to override network parameters in the configuration.Nick Mathewson2021-02-161-2/+17
|
* Detect consensuses that are signed by the wrong authorities.Nick Mathewson2021-01-251-8/+5
| | | | | | | | | | | | With this patch we don't consider a consensus to be even potentially well-signed if the authorities that are listed as signing it don't contain enough authorities we believe in. Otherwise, we'd just try fetching certs for them and failing forever. (I found this by switching from a chutney network to the main network without cleaning out my cache.) Closes #44
* Function to see whether the authorities on a netstatus are correct.Nick Mathewson2021-01-251-0/+48
| | | | | We should find out if we believe in the authorities before we even think of downloading their certs.
* Remove some now unused methods from NetParams.Nick Mathewson2020-12-221-27/+0
|
* Expose network parameters more sensibly from NetDir.Nick Mathewson2020-12-221-2/+6
|
* Migrate from lazy_static to once_cell.Nick Mathewson2020-12-226-238/+243
|
* Make sure that a circuit doesn't use relays in the same familyLunar2020-12-162-0/+30
| | | | | | | | | | | | | We implement `Relay::in_same_family` which is in turn used by `ExitPathBuilder::pick_path` to avoid picking relays in the same family. Compared to the original C implementation, we are missing support for options EnforceDistinctSubnets and NodeFamilySets. This has only been very lightly tested so far. Closes: #43
* Fix some rustdoc warnings.Nick Mathewson2020-12-091-1/+1
|
* Make RSAIdentity implement Copy.Nick Mathewson2020-12-081-2/+2
|
* Resolve a few nightly-only clippy issuesNick Mathewson2020-12-072-13/+6
|
* Enforce that the periods in a consensus lifetime are nonempty.Nick Mathewson2020-12-042-6/+15
| | | | | To be valid, a lifetime must have valid_after < fresh_until < valid_until.
* authcert: move location into UncheckedAuthCert.Nick Mathewson2020-12-041-22/+39
| | | | This lets us make AuthCert Send and Sync.
* Fix a copy-paste bug in netstatus::LifetimeNick Mathewson2020-12-041-1/+1
|
* Add a few easy tests in weights.rsNick Mathewson2020-12-021-2/+1
|
* Run cargo fix --edition-idiomsNick Mathewson2020-12-022-4/+4
|
* Use a better calculation for deciding if we have enough paths.Nick Mathewson2020-12-021-1/+32
|
* Implement correct (?) weighting for path selection.Nick Mathewson2020-12-021-1/+15
|
* When storing consensuses, index them by the sha3 of the whole file.Nick Mathewson2020-11-231-5/+7
|
* Initial pass on directory-manager code.Nick Mathewson2020-11-192-1/+7
| | | | | | | | 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.
* Refactor AuthCertKeyIds::cmp().Nick Mathewson2020-11-191-5/+3
|
* Add support for using fallback directories in path constructionNick Mathewson2020-11-191-1/+14
| | | | | | This is mainly a refactoring commit, with a little new code. It also adds #[derive(Copy,Clone)] for a few types.
* Make AuthCertKeyIds sortable.Nick Mathewson2020-11-161-0/+16
|
* Type and functions for key ID inspection of AuthCert.Nick Mathewson2020-11-162-27/+52
|
* Have the consensus-parsing code expose the signed piece of the consensus.Nick Mathewson2020-11-161-6/+9
|
* Add accessors for consensus lifetimes.Nick Mathewson2020-11-141-6/+43
|
* Remember the position of authcert and microdescsNick Mathewson2020-11-143-12/+64
| | | | | We'll need this to save them to disk after parsing them from an upstream source.