summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src
Commit message (Collapse)AuthorAgeFilesLines
* guardmgr: Stop using now-needless retain_mut crate.Nick Mathewson2023-11-302-10/+2
|
* oneshot: Apply deferred rustfmt churnIan Jackson2023-10-112-6/+3
| | | | cargo fmt, precisely.
* oneshot: Use veneer in tor-ptmgrIan Jackson2023-10-111-1/+4
|
* oneshot: Use veneer in tor-guardmgrIan Jackson2023-10-112-2/+3
|
* Add cognitive-complexity exceptions for clippy.Nick Mathewson2023-09-051-0/+1
| | | | I have no idea why these became necessary.
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-2310-0/+10
|
* guardmgr: Fix a dead-code warning when built without bridge support.Nick Mathewson2023-08-161-0/+1
|
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* tor-guardmgr: bridges: getter for BridgeConfigBuilder.transportIan Jackson2023-07-201-0/+8
| | | | | BridgeConfigBuilder is Serialize so this isn't making any new API promises. Ideally we'd have getters like this everywhere.
* Merge branch 'bug638' into 'main'Alexander Færøy2023-07-142-4/+14
|\ | | | | | | | | | | | | Stop unconditionally marking bridges as having dir info. Closes #638 See merge request tpo/core/arti!1408
| * Better report for any recurrence of bug #638.Nick Mathewson2023-07-131-0/+14
| |
| * Stop unconditionally marking bridges as having dir info.Nick Mathewson2023-07-131-4/+0
| | | | | | | | | | | | | | | | | | When we implemented bridges, we added code in 08473872abccf389 to conditionally mark their directory info as present or not present. But the we didn't remove the old code to mark them present unconditionally! Fixes #638.
* | Bridges: deduplicate addresses.Nick Mathewson2023-07-131-0/+2
|/ | | | | Currently we list an address for a bridge twice if it is listed both in the bridge line and the bridge descriptor. That can't be right.
* Merge branch 'clippy-allow' into 'main'Ian Jackson2023-07-1110-0/+11
|\ | | | | | | | | clippy: Allow some of our existing code patterns See merge request tpo/core/arti!1396
| * Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-1010-0/+11
| |
* | rng ranges: Use gen_range_infallible() for Duration::ZERO..=TIan Jackson2023-07-101-1/+2
|/
* Remove some needless into_iter() calls.Nick Mathewson2023-07-101-5/+3
| | | | | | Clippy nightly now detects when you're calling into_iter() and passing the result into something that accepts an `impl IntoIterator`.
* rng ranges: Use inclusive Duration ranges in several placesIan Jackson2023-07-071-1/+1
| | | | | | | | | | | | | | Many of these call sites would panic if, somehow, the upper bound was zero. In most cases it is very complicated to see if whether this could happen. However, there is a better answer: Durations are (conceptually) dense, so picking the closed set (which includes its boundary) rather than the open one (which doesn't) will make little practical difference. So change four call sites to use `..=` instead of just `..`.
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* Additional documentation around bridges/PT configurationNick Mathewson2023-07-031-0/+11
| | | | | | | This tries to flesh out some of the details for users who may be new to bridges and PTs. Closes #706.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* guardmgr, netdir: fix some needless-mut warningsNick Mathewson2023-05-181-2/+2
| | | | Found by clippy nightly
* guardmgr: suppress a clippy-nightly warning.Nick Mathewson2023-05-181-0/+1
| | | | | I don't love this change, but apparently we are trying for "consistency".
* tor-guardmgr, tor-proto: minor logging tweakseta2023-05-181-2/+2
| | | | | | | | - We make the tor-guardmgr "We have found that {} is usable" line include the word "guard", otherwise it doesn't appear very useful to a user in safe logging mode, since the guard gets replaced with [scrubbed]. - The "Actually got an end cell..." message is downgraded to DEBUG.
* Use bool::then_some() as appropriateNick Mathewson2023-04-112-2/+2
| | | | | | Now that we require a version of Rust that allows `b.then_some(v)`, clippy complains about our use of `b.then(|| v)`.
* guardmgr: update feature behavior wrt testing and pts.Nick Mathewson2023-04-061-2/+2
|
* Use humantime in tor-guardmgrSaksham Mittal2023-02-271-3/+3
|
* "Fix" remaining unchecked-subtraction warnings.Nick Mathewson2023-01-271-1/+3
| | | | | In both cases I think it's fine to panic; but it's best to do so explicitly.
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-2710-0/+10
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* Complete our migration to base64ct.Nick Mathewson2023-01-201-2/+2
| | | | | | | | | This is in lieu of upgrading to the latest base64 crate, which has a different API from the old one. Since we have to migrate either way, we might as well use base64ct everywhere. I don't think that most of these cases _require_ constant-time base64, but it won't hurt.
* Merge branch 'test-lints' into 'main'eta2023-01-067-0/+56
|\ | | | | | | | | Add test lint blocks to all "mod test" See merge request tpo/core/arti!937
| * test lint blocks: Add many many automaticallyIan Jackson2022-12-127-0/+56
| | | | | | | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* | Remove allow(unreachable_pub) from tor-guardmgr/src/lib.rsNeel Chauhan2022-12-161-5/+0
|/ | | | Closes #589
* Rename for_circuit_usage => as_relay_with_descNick Mathewson2022-11-302-2/+2
|
* bridge config: Add a TODO about a redundant cloneIan Jackson2022-11-301-0/+3
|
* bridge config: Rename accessorsIan Jackson2022-11-301-2/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/904#note_2858480
* bridge config: Use unreachable, not None.expectIan Jackson2022-11-301-2/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/904#note_2858479
* Separate BridgeAddr and PtTargetAddrIan Jackson2022-11-301-22/+30
| | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/668#note_2858220 This commit is difficult to split up. The innards of BridgeAddr and PtTargetAddr are still a bit entangled.
* Merge branch 'more-linkspec-tests' into 'main'Nick Mathewson2022-11-291-1/+1
|\ | | | | | | | | Add tests for a bunch of code in tor-linkspec See merge request tpo/core/arti!867
| * Fix up compatibility issues between linkspec tests and other patchesNick Mathewson2022-11-281-1/+1
| |
* | Merge branch 'ptmgr-optional-dep' into 'main'Ian Jackson2022-11-291-0/+5
|\ \ | | | | | | | | | | | | | | | | | | Support building without pluggable transports Closes #649 See merge request tpo/core/arti!898
| * | guardmgr: Conditionalise DisplayRule::RedactedIan Jackson2022-11-291-0/+5
| | | | | | | | | | | | This is unused in bridgeless configs. Fixes a compiler warning.
* | | guardmgr: remove todo about bridge::config::Inner membersNick Mathewson2022-11-291-4/+0
| | | | | | | | | | | | We've revised this a few times; now it seems plausible.
* | | guardmgr: Remove now-unneeded #[allow(unnecessary_wraps)]Nick Mathewson2022-11-291-1/+0
|/ /
* | Rustdoc fix: escape []s.Nick Mathewson2022-11-281-1/+1
| |
* | GuardMgr: Treat Guards as sensitive and Bridges as redacted.Nick Mathewson2022-11-283-5/+46
| | | | | | | | | | This machinery is a bit inelegant, but it is all confined to be within the GuardMgr crate, so IMO it should be fine for now.
* | Display guards in redacted form in guard status messages.Nick Mathewson2022-11-281-3/+3
|/ | | | | | Closes #627, again. Closes #648.
* Merge branch 'chanmethod-non-exhaustive' into 'main'Nick Mathewson2022-11-272-1/+27
|\ | | | | | | | | Make ChannelMethod non-exhaustive See merge request tpo/core/arti!891
| * Make ChannelMethod non-exhaustiveIan Jackson2022-11-242-1/+27
| | | | | | | | | | | | | | | | | | Enums with variants conditional on cargo features must be non-exhaustive, because cargo features are supposed to be additive, meaning that enabling a feature (which might happen due to some random distant thing) ought not to break things using that enum. There were surprisingly few places to fix this.