Commit Graph

5231 Commits

Author SHA1 Message Date
Nick Mathewson 1d4db04e4e GuardMgr: rename n_primary_without_dir_info
What this function actually does is return the number of primary
guards whose presence (by identity) is ambiguous in a current
universe.  The new name and documentation should help avoid
confusion.

The method's old name had led me astray when identifying whether it
should apply to bridges in one case.  This commit also removes the
corresponding `TODO pt-client`.
2022-11-10 12:11:28 -05:00
Nick Mathewson 1ad45f164e Remove TODO to rename for_circuit_usage in favor of #623 2022-11-10 12:11:28 -05:00
Nick Mathewson b8792307ac GuardMgr: Remove TODO to move `mod bridge` to another crate
The code seems happy enough here for now.
2022-11-10 12:11:28 -05:00
Nick Mathewson 942dfc8487 Resolve todo!()s and TODOs around BridgeRelay::HasAddrs.
Also, add a bunch of reminders around these implementations that
`HasAddrs` returns all the address associated with you for GeoIp or
family purposes, even if they are _not_ ones that we should actually
contact you at.
2022-11-10 12:11:28 -05:00
Nick Mathewson dcfb4d0956 RouterDesc: Add an or_ports method. 2022-11-10 12:11:28 -05:00
Nick Mathewson dd6d03f579 Merge branch 'msrv-1.60' into 'main'
Increase MSRV to 1.60

Closes #591, #526, #613, and #621

See merge request tpo/core/arti!837
2022-11-10 17:06:23 +00:00
Nick Mathewson 71510fbd96 Temporarily disable it_cancels_delayed_firings.
This test is timing-dependent in a way that seems to fail on heavily
loaded CI machines. See #545.
2022-11-10 11:58:35 -05:00
Nick Mathewson e5c26a123f Actually, require rsa 0.7.1.
rsa 0.7.0 has been yanked.
2022-11-10 11:26:35 -05:00
Nick Mathewson 0a1141db32 tor-persist: use map_while
It was introduced in Rust 1.57.
2022-11-10 11:04:20 -05:00
Nick Mathewson 06e4e91614 Remove allow() for a false-positive warn on Rust 1.56. 2022-11-10 11:04:20 -05:00
Nick Mathewson e19ff0ec21 Upgrade rsa to 0.7. Closes #613. 2022-11-10 11:04:20 -05:00
Nick Mathewson 34ae02e75f Upgrade to serde_with 2, phf 0.11. Closes #526. 2022-11-10 11:04:18 -05:00
Nick Mathewson 2c13a78c57 Upgrade to tinystr 0.7. Closes #591. 2022-11-10 10:57:33 -05:00
Nick Mathewson 9ca19ea7f9 Use rust 1.60 in minimal-versions.
Closes #621
2022-11-10 10:57:33 -05:00
Nick Mathewson 936920b26e bump rust-version to 1.60 in every crate. 2022-11-10 10:57:33 -05:00
Ian Jackson eacb5dc2e3 bridge descriptor dormancy: Define an enum and semantics
This is part of #630.
2022-11-10 15:17:36 +00:00
Nick Mathewson d9788c16b3 Merge branch 'bridge-error' into 'main'
Use ErrorKind::TorAccessFailed for misbehaving bridges

See merge request tpo/core/arti!842
2022-11-10 13:50:47 +00:00
Nick Mathewson 3c29dfd99d Merge branch 'bdm-process-doc-test' into 'main'
bridge descs: Add tests for process_document

See merge request tpo/core/arti!841
2022-11-10 13:50:23 +00:00
Nick Mathewson 6454896d95 Merge branch 'bdm-params' into 'main'
Remove TODO re BridgeDescDownloadConfig defaults

See merge request tpo/core/arti!839
2022-11-10 13:49:54 +00:00
Ian Jackson d0d40a1ca4 Merge branch 'check-more-targets' into 'main'
Check more targets

See merge request tpo/core/arti!844
2022-11-10 13:34:17 +00:00
trinity-1686a 614cf34284 Check more targets 2022-11-10 13:34:17 +00:00
Nick Mathewson e3c3bc797b Merge branch 'drop-todos' into 'main'
bridge desc: Deal with two TODOs

See merge request tpo/core/arti!843
2022-11-08 21:53:57 +00:00
Ian Jackson 42dd5d7746 bridge desc: Drop a done TODO
We have a separate BridgeDescMgr, rather than reusing DirMgr, so we
will not be implementing BridgeDescProvider for DirMgr.
2022-11-08 18:54:31 +00:00
Ian Jackson 8fbff3a27f Use ErrorKind::TorAccessFailed for misbehaving bridges
(Use semantic linefeed for the doc comment.)
2022-11-08 18:52:57 +00:00
Ian Jackson d808f70a13 bridge descs: Add tests for process_document 2022-11-08 18:42:34 +00:00
Ian Jackson f1f4ca56a8 Remove TODO re BridgeDescDownloadConfig defaults 2022-11-08 17:34:25 +00:00
Ian Jackson 05cad7c0eb bridge desc: todo re config: weaken and reference a new ticket 2022-11-08 17:34:13 +00:00
Ian Jackson 4f893648b8 Merge branch 'clap-v3' into 'main'
Upgrade to clap 3

Closes #616

See merge request tpo/core/arti!830
2022-11-08 17:11:04 +00:00
Nick Mathewson 9dcfc2bb65 GuardMgr: Docs for BridgeDescProvider 2022-11-08 11:35:35 -05:00
Nick Mathewson 91cfd7ea4a GuardMgr: Remove a TODO pt-client comment.
The BridgeSet type does not necessarily need further changes... and
if it gets them, it won't be because of this comment.
2022-11-08 11:35:35 -05:00
Ian Jackson 8efcfb64af Merge branch 'misc-todo-ptclient' into 'main'
Downgrade and/or remove a few misc "TODO pt-client" comments

See merge request tpo/core/arti!838
2022-11-08 16:21:30 +00:00
Nick Mathewson ec9e9c86e7 Merge branch 'store' into 'main'
Persistently cache bridge descriptors

Closes #619

See merge request tpo/core/arti!831
2022-11-08 15:10:21 +00:00
Ian Jackson 46286dddd4 Merge branch 'todo-ptclient-linkspec-1' into 'main'
Resolve `TODO pt-client` entries in linkspec

See merge request tpo/core/arti!836
2022-11-08 15:01:02 +00:00
Ian Jackson ea369e8385 bridge descs: Rename BridgeDescMgr from BridgeDescManager
This is more consistent with our naming elsewhere.

Suggested-by: Nick Mathewson <nickm@torproject.org>
2022-11-08 14:40:28 +00:00
eta 53f62eb8be Merge branch 'store-yak-misc' into 'main'
Small misc yaks for bridge descriptor persistence

See merge request tpo/core/arti!828
2022-11-08 14:28:14 +00:00
Nick Mathewson 3bcb85bd59 Merge branch 'guards_as_bridges_part4' into 'main'
GuardMgr: Almost finish wiring Bridges in as a guard substitute

See merge request tpo/core/arti!832
2022-11-08 13:48:27 +00:00
Nick Mathewson 6b422b1c4d circmgr: downgrade TODO pt-client comments
These are structure-internal things we can solve later, if ever.
2022-11-08 08:31:59 -05:00
Nick Mathewson c99976fabc ChanMgr: downgrade and remove a few TODO-ptclient comments
renamings are now #623.  Code movement can happen later.
2022-11-08 08:27:19 -05:00
Ian Jackson d9d9cdeac9 bridge descs: Apply sensitive() to bridge identity in error log msg 2022-11-08 13:19:42 +00:00
Nick Mathewson ada3acf6b8 Try to explain exactly what lookup_bridge_circ_target does 2022-11-08 08:10:15 -05:00
Nick Mathewson 0fd41a7faf GuardMgr: Try to explain what is going on with update()
This explanation is slightly complicated by the fact that I think
that one of the calls to update_guardset_internal() is possibly
unnecessary, and that one of the calls that it makes is potentially
ill-advised.

I'm not going to make those changes right now, however, because they
are potentially a little destabilizing.
2022-11-08 08:10:15 -05:00
Nick Mathewson 6591842458 Refactor configured_bridges
Now it is an Option, and is set to None if bridges aren't enabled.

This simplifies `replace_bridge_config` a bit, and forces us to
check for `None` in a few more places.
2022-11-08 08:10:15 -05:00
Nick Mathewson 2a5b4d21e3 GuardMgr: Document that providers should only be installed once.
Enforce this with assert!() and a documented panics section.
2022-11-08 08:10:15 -05:00
Nick Mathewson 9fda8d17c4 GuardMgr: Fix build with bridge-client disabled. 2022-11-08 08:10:15 -05:00
Nick Mathewson 6bcce19655 GuardMgr: Remove no-longer-relevant `TODO pt-client` comments
Also remove a bunch of now-unnecessary `allow(dead_code)`
annotations.
2022-11-08 08:10:15 -05:00
Nick Mathewson 1418ec13a8 GuardMgr: Rename an error variant 2022-11-08 08:10:15 -05:00
Nick Mathewson 3943c6cd1e GuardMgr: Spelling fixes and normalizations. 2022-11-08 08:10:15 -05:00
Nick Mathewson 3f3d82ee48 GuardMgr: do not use fallbacks when in bridge mode. 2022-11-08 08:10:15 -05:00
Nick Mathewson 5c3bb3d7e1 GuardMgr: When possible, return a FirstHop that can be a CircTarget
We do this by checking the FirstHops we're about to return, and when
they correspond to bridges, looking up an appropriate BridgeRelay
in the current BridgeSet (if we can).
2022-11-08 08:10:15 -05:00
Nick Mathewson 25d7924832 GuardMgr: Refactor UniverseRef to contains Arcs.
We already _have_ these Arc<>s whenever we construct a UniverseRef,
so there's no real point in using &refs and making these so
hard to construct.
2022-11-08 08:10:15 -05:00