summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | Make UncheckedRelay public in tor-netdir.Nick Mathewson2021-10-071-4/+4
| | | | | | | | This will let us provide a couple of better APIs for use in tor-guardmgr
* | Add From<u64> for RelayWeight.Nick Mathewson2021-10-071-0/+6
| |
* | Change tor-persist to use json instead of toml.Nick Mathewson2021-10-074-20/+22
| | | | | | | | | | | | The limitations with toml seemed to be reaching a head, and I wasn't able to refactor the guardmgr code enough to actually have its state be serializable as toml. Json's limitations are much narrower.
* | Fix a type inference complaint in tor-dirmgr's tests.Nick Mathewson2021-10-071-1/+1
|/ | | | I have no idea why this just turned up now.
* Update cargo.lock; upgrade to newer rusqlite.Nick Mathewson2021-10-051-1/+1
|
* Use subtle and some refactoring to remove branches in ntorNick Mathewson2021-10-013-22/+54
| | | | Closes #163
* Implement ConstantTimeEq for key ids.Nick Mathewson2021-10-012-4/+16
|
* Allow building tor-persist for WASMJani Monoses2021-10-012-1/+5
|
* Clarify why we use a dyn pointer for StorageHandle.Nick Mathewson2021-09-301-1/+7
|
* Use StorageHandle in tor_circmgr.Nick Mathewson2021-09-303-70/+15
|
* remote unused tor-persist/src/config.rsNick Mathewson2021-09-301-10/+0
|
* Add tests for tor-persist object-safe wrapper.Nick Mathewson2021-09-301-0/+34
|
* tor-persist: Add a testing-only state manager that doesn't use diskNick Mathewson2021-09-303-0/+174
|
* Move FsStatemgr to an inner module.Nick Mathewson2021-09-302-187/+194
|
* Add an object-safe wrapper for StateMgr.Nick Mathewson2021-09-302-0/+98
| | | | | This is an attempt to uplift the trick that tor-circgmr is currently using, since we'll want it in tor-guardmgr too.
* Ensure pick_n_relays returns relays in random order.Nick Mathewson2021-09-291-3/+5
| | | | (Also, fix a test)
* tor-netdir: Add RelayWeight type and accessors.Nick Mathewson2021-09-292-0/+129
| | | | | I'm not thrilled with this code, but I think it's needed to implement guards correctly.
* tor_netdir::testnet: Correct a documentation error.Nick Mathewson2021-09-291-1/+1
|
* tor-netdir: Add some accessor that guardmgr will need.Nick Mathewson2021-09-291-2/+67
| | | | | | | | We'll need `id_pair_is_listed()` to track whether a sampled guard is (or is not) listed in the consensus. We'll need `missing_descriptor_for` to see whether we've downloaded enough microdescs to use a consensus.
* Typo fix in comment.Nick Mathewson2021-09-291-1/+1
|
* update fslock to compile androidTrinity Pointard2021-09-252-2/+2
|
* Upgrade memmap2, directories, and dirs dependencies.Nick Mathewson2021-09-233-4/+4
|
* remove unused depDaniel Eades2021-09-191-1/+0
|
* Enable js feature for getrandom for WASM.Jani Monoses2021-09-172-0/+7
| | | | By default rand does not build for WASM browser targets.
* Stop using anyhow in tor-dirclient.Jani Monoses2021-09-163-2/+9
|
* tor-netdir: Add a by_id_pair() function to look up a relay by both IDs.Nick Mathewson2021-09-161-1/+21
|
* Do not use set_ prefix on derive_builder settersJani Monoses2021-09-164-11/+11
|
* derive 'Default' where possibleDaniel Eades2021-09-112-17/+2
|
* Add identity-based accessors (and indices) to NetDir.Nick Mathewson2021-09-101-36/+152
| | | | | | (Thank goodness for rust; we messed up the coherency in C here so many times, but I'm pretty sure that this time around we can't have gotten it wrong.)
* Merge remote-tracking branch 'origin/mr/77'Nick Mathewson2021-09-102-11/+21
|\
| * Create a separate logging section in config.Jani Monoses2021-09-092-11/+21
| |
* | Use derive_builder for Authority and FallbackDir.Nick Mathewson2021-09-104-125/+23
| |
* | Suppress a cognitive-complexity lint in testsNick Mathewson2021-09-091-0/+1
| |
* | Typo fixesNick Mathewson2021-09-094-6/+6
| |
* | Add guard-related network parameters.Nick Mathewson2021-09-091-3/+118
| |
* | Add an IntegerDays numeric type.Nick Mathewson2021-09-091-0/+54
| |
* | Use macros and traits to simplify the declaration of parameters.Nick Mathewson2021-09-092-135/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we'd have to declare the field for a parameter in one place, its default in a second, and its consensus key in a third. That's error-prone and not so fun! This patch changes the way we declare parameters so that we declare a structure once, and macros expand it to all do the right thing. This required a few new traits and implementations to ensure uniformity across the types that can go in parameters: We need every parameter type to implement TryFrom<i32> and to implement SaturatingFromInt32. Eventually we might want SaturatingFromInt32 to be a more generic SaturatingFrom, but that's not for now.
* | Use derive_builder for the rest of tor_dirmgr::configNick Mathewson2021-09-092-83/+24
| |
* | Use derive_builder for DownloadScheduleConfigNick Mathewson2021-09-081-66/+7
| |
* | Use derive_builder for NetworkConfig.Nick Mathewson2021-09-084-148/+43
|/
* Merge remote-tracking branch 'origin/mr/73'Nick Mathewson2021-09-083-7/+33
|\
| * Make journald an optional feature.Jani Monoses2021-09-072-7/+9
| |
| * Do not log to journald by defaultJani Monoses2021-09-071-1/+1
| |
| * Allow logging to journald.Jani Monoses2021-09-073-7/+31
| | | | | | | | | | Log to journald when available, add journald config option. Separate logging setup into its own function.
* | Fix clippy warnings in tests with --all-featuresNick Mathewson2021-09-082-10/+9
| |
* | Fix/suppress a few more clippy lints in tests.Nick Mathewson2021-09-086-9/+14
| | | | | | | | | | I'm alright with allowing cognitive-complexity violations in the tests.
* | Merge remote-tracking branch 'origin/mr/71'Nick Mathewson2021-09-0883-112/+196
|\ \
| * | fix/silence clippy lints in test modulesDaniel Eades2021-09-0884-112/+197
| | |
* | | Check for correct-ish decoding of all parameters.Nick Mathewson2021-09-081-4/+77
| | |
* | | Add validation function to WeightSetNick Mathewson2021-09-081-1/+18
| | | | | | | | | | | | | | | Our relay selection code can give wrong answers if we overflow u64::MAX, so let's make sure we never do that.