summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr
Commit message (Collapse)AuthorAgeFilesLines
* Bump arti- and tor- crates to 0.23.0Nick Mathewson2024-09-301-21/+21
| | | | | | | | | | | | | | Per our policy, every one of these gets a minor bump. Generated with: ``` for crate in $(./maint/list_crates | grep '^\(tor\|arti\)-' ); do cargo set-version --bump minor -p $crate; done ``` (Note the use of `-` at the end end of the grep pattern to prevent matching the `arti` crate.)
* Minor bumps on non-tor/arti cratesNick Mathewson2024-09-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are not in the tor/arti namespace, but we have given them MSRV bumps: ``` oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error ``` We are counting this as a breaking change. Since all of these crates are at 0.x.x, we have indicated the breaking change with a minor version bump. This commit was generated with the following script: ``` BUMPS=" oneshot-fused-workaround slotmap-careful fslock-guard hashx equix caret fs-mistrust safelog test-temp-dir retry-error " for crate in $BUMPS; do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'msrv-1.77-and-rusqlite-update' into 'main'David Goulet2024-09-261-1/+1
|\ | | | | | | | | Upgrade MSRV to 1.77 , and rusqlite to 0.32.1 See merge request tpo/core/arti!2451
| * Upgrade MSRV to 1.77Nick Mathewson2024-09-251-1/+1
| | | | | | | | This will allow us to upgrade to the latest version of rusqlite.
* | Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-253-7/+7
|/ | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* Bump MSRV from 1.70 to 1.75.Wesley Aptekar-Cassels2024-09-161-1/+1
|
* tor-guardmgr: Convert a TODO into a NOTE.Gabriela Moldovan2024-09-101-1/+2
| | | | | | | | | This behavior is OK, so this doesn't need to be a TODO. See the discussion at https://gitlab.torproject.org/tpo/core/arti/-/issues/1352#note_3015217 Closes #1352
* tor-netdir: Allow access to the `ConsensusBuilder` when building test netdirs.Gabriela Moldovan2024-09-093-8/+8
| | | | | This allows us to set SRVs for example (needed because by default, the test `NetDir` is built from a consensus that doesn't contain any SRVs).
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-21/+21
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* oneshot-fused-workaround: Set the initial version to 0.1.0.Gabriela Moldovan2024-09-031-1/+1
| | | | This is the first time we're publishing this, so let's start at 0.1.0.
* Fix formatting issues introduced by fixup-features.Gabriela Moldovan2024-09-031-1/+4
|
* Run fixup-features in preparation for release.Gabriela Moldovan2024-09-031-1/+1
|
* Fix typosDimitris Apostolou2024-09-033-3/+3
|
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-284-3/+4
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* Don't need to tell docs.rs to enable `docsrs` cfgKunal Mehta2024-08-021-1/+0
| | | | | It now does it automatically, see <https://docs.rs/about/builds#detecting-docsrs>.
* Bump versions for tor- and arti- crates to 0.21.0Nick Mathewson2024-08-011-21/+21
| | | | | | | | | | This is the result of: ``` for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do cargo set-version -p $crate 0.21.0 done ```
* Update to derive-deftly 0.14Ian Jackson2024-07-081-1/+1
| | | | | This removes the deprecated syntaxes. Updating now will prevent us re-introducing the old syntaxes, which we updated in arti!2209.
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Merge branch 'feat' into 'main'gabi-2502024-06-251-1/+1
|\ | | | | | | | | Run maint/fixup-features See merge request tpo/core/arti!2229
| * Run maint/fixup-featuresIan Jackson2024-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Precisely nailing-cargo -Eu run -p fixup-features Cargo.toml These changes are just `full` propagation. Note the `?` in the arti-relay propagation, which is essential: we don't actually *enable* arti-relay at all, with this. Also, there is a formatting anomaly, which I'll fix in a moment.
* | Update to itertools 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | | | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p itertools
* | Require strum 0.26.3Ian Jackson2024-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We're about to update to iterools 0.13.0. We must therefore have a version of strum which is not affected by https://github.com/Peternator7/strum/issues/358 Precisely git-grep -l '^strum' | xargs perl -i~ -pe 's{"0\.26"}{"0.26.3"}' No changes to lockfile - we're already using 0.26.3, except perhaps in the minimal versions test.
* | Update to derive-deftly 0.13.0Ian Jackson2024-06-251-1/+1
|/ | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p derive-deftly
* tor-guardmgr: Make some vanguard test helpers public (fmt).Gabriela Moldovan2024-06-201-10/+5
|
* tor-guardmgr: Make some vanguard test helpers public.Gabriela Moldovan2024-06-202-51/+69
| | | | | | We will soon need these helpers outside of `tor-guardmgr` too. This commit is mainly code motion.
* Update to derive-deftly 0.12.1Ian Jackson2024-06-171-1/+1
| | | | | | * Bump in Cargo.toml * Deal with `${Xmeta as ...}` incompatible change, by always specifying an `as`, and changing `as tokens`.
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - tor-linkspec - tor-cell - tor-proto - tor-netdoc - tor-consdiff - tor-netdir - tor-relay-selection - tor-persist - tor-chanmgr - tor-ptmgr - tor-guardmgr - tor-circmgr - tor-dirclient - tor-dirmgr - tor-keymgr - tor-hsclient - tor-hsservice - tor-hsrproxy - arti-client - arti-rpcserver - arti-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above
* tor-guardmgr: Add test for vanguards state file deserialization.Gabriela Moldovan2024-06-034-2/+328
| | | | This checks that we can read `vanguards.json` state files.
* tor-config: Apply deferred cargo fmt.Gabriela Moldovan2024-06-031-1/+1
|
* tor-config: Add macro for implementing NotAutoValue.Gabriela Moldovan2024-06-031-2/+2
|
* tor-config: Add NotAutoValue trait bound to ExplicitOrAuto inner type.Gabriela Moldovan2024-06-031-1/+3
| | | | | | | This is a safeguard to prevent users from using ExplicitOrAuto with types that serialize to the same value as ExplicitOrAuto::Auto. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2146#note_3030692
* tor-guardmgr: Replace From impl with VanguardConfig::mode accessor.Gabriela Moldovan2024-06-032-10/+11
|
* tor-guardmgr: Fix broken doc link.Gabriela Moldovan2024-06-031-1/+1
|
* tor-guardmgr: Use ExplicitOrAuto in the VanguardConfig (fmt).Gabriela Moldovan2024-06-031-2/+8
|
* tor-guardmgr: Use ExplicitOrAuto in the VanguardConfigGabriela Moldovan2024-06-032-7/+18
|
* tor-guardmgr: Unconditionally define VanguardConfig.Gabriela Moldovan2024-06-033-17/+17
| | | | | | | | | We want to export the `VanguardConfig` even if the `vanguards` feature is disabled (we will need to unconditionally include it in the arti config). Note that if `vanguards` are disabled, the `VanguardMode` from the `VanguardConfig` can only be `Dsiabled`.
* tor-guardmgr: Map NoSuitableRelay errors to ErrorKind::NoPath.Gabriela Moldovan2024-05-091-2/+1
|
* tor-guardmgr: Add an error variant for when the vanguard mode is unsuitable.Gabriela Moldovan2024-05-092-8/+25
|
* tor-guardmgr: Return a BootstrapRequired error if all the sets are empty (fmt).Gabriela Moldovan2024-05-091-1/+6
|
* tor-guardmgr: Return a BootstrapRequired error if all the sets are empty.Gabriela Moldovan2024-05-092-14/+27
| | | | | | | | | Previously, `select_vanguard` returned a `NoSuitableRelay` error if it was unable to select a relay to use as a vanguard. We now distunguish the "there are no suitable relays in the vanguard sets" (`NoSuitableRelays`) error case from the "our vanguard sets are empty" (`BootstrapRequired`) one.
* tor-guardmgr: Fix typo in documentation.Gabriela Moldovan2024-05-091-1/+1
|
* tor-guardmgr: Add a BootstrapRequired error for VanguardMgr.Gabriela Moldovan2024-05-091-0/+9
|
* tor-guardmgr: Move VanguardMgrError to a separate module.Gabriela Moldovan2024-05-092-40/+50
| | | | | This is about to grow another variant, so I'm moving it to a dedicated `err` module.
* tor-guardmgr: Remove a nonsensical TODO.Gabriela Moldovan2024-05-091-1/+0
| | | | | | The `match` below it is fine, there's no need to rewrite it. (I think this TODO is actually dupe of the the TODO above it).
* tor-guardmgr: Remove TODO about removing Vanguard abstraction.Gabriela Moldovan2024-05-091-3/+0
| | | | | I think it's alright to keep it: it gives us the flexibility to extend it later on, if needed.
* tor-guardmgr: Remove unnecessary clippy allow.Gabriela Moldovan2024-05-091-1/+0
|
* tor-guardmgr: Remove a TODO HS-VANGUARDS.Gabriela Moldovan2024-05-091-3/+0
| | | | | | This TODO doesn't really need to be implemented: we can test the `VanguardMgr` just the same without it (`GuardMgrInner` is similar, in that it doesn't mock the rng).
* tor-guardmgr: Remove dead_code allow.Gabriela Moldovan2024-05-091-1/+0
|
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Resolve some clippy warnings about empty rustdoc.Nick Mathewson2024-05-051-3/+1
| | | | | (In most cases, by writing the documentation; in tests, by permitting the documentation to be missing.)