Nick Mathewson
2bd422663e
Resolve a dead-code warning.
2022-11-15 13:53:14 -05:00
Nick Mathewson
d78cde7dea
Allow a subset-only ChanMethod match when looking up a BridgeConfig
...
If we have a bridge guard that is using Direct connection and it
knows multiple addresses, our code to match it with a BridgeConfig
is wrong, because the BridgeConfig has only one address, and our
code looks for an exact match.
Fixes #642 .
2022-11-15 13:53:14 -05:00
Ian Jackson
67242a2986
arti cfg test: Document exhaustive_1 and comment exhaustive
2022-11-15 18:25:39 +00:00
Nick Mathewson
db9440464b
Remove a spurious log that I committed by mistake. Whoops.
2022-11-15 13:15:32 -05:00
eta
5eccaf008b
Merge branch 'fix_parse' into 'main'
...
netdoc: Allow empty lines at the end of router descriptors
Closes #637
See merge request tpo/core/arti!857
2022-11-15 17:41:29 +00:00
Nick Mathewson
d0f3f25483
Merge branch 'implement_usage' into 'main'
...
Implement more cases for `DirSpecificTarget`.
See merge request tpo/core/arti!855
2022-11-15 17:10:04 +00:00
Nick Mathewson
050eab9bba
Implement more cases for `DirSpecificTarget`.
...
Without this fix, any attempt to actually use a circuit for a
`DirSpecificTarget` will fail, since supports() will say false, and
`restrict_mut()` will say `NotSupported`.
2022-11-15 11:42:54 -05:00
Nick Mathewson
89be046466
netdoc: Allow empty lines at the end of a router descriptor.
2022-11-15 11:27:43 -05:00
Nick Mathewson
bc7780bffd
tor-netdoc: Add a new ErrorKind for EmptyLine.
...
Empty lines were previously reported as BadKeyword, which is
confusing.
2022-11-15 11:27:43 -05:00
Ian Jackson
46c272e293
arti cfg test: Break out CONFIG_KEYS_EXPECT_NO_EXAMPLE
...
Giving this a name will allow us to refer to it docs in a moment.
2022-11-15 15:38:47 +00:00
Ian Jackson
c7087d3679
arti cfg test: Drop a redundant allow
...
This allow is also present in the standard lint block at the start of
the test inline module.
2022-11-15 15:11:25 +00:00
Nick Mathewson
10c9e0e460
Merge branch 'bdm-arc' into 'main'
...
arti-client: Retain a strong reference to the inner Arc<BridgeDescMgr>
Closes #636
See merge request tpo/core/arti!854
2022-11-15 15:02:21 +00:00
Ian Jackson
232e82491d
guardmgr: Document that guardmgr only holds a Weak
2022-11-15 14:39:00 +00:00
Ian Jackson
fdeb2db1c2
arti-client: Retain a strong reference to the inner Arc<BridgeDescMgr>
...
Fixes #636 .
2022-11-15 14:36:02 +00:00
Ian Jackson
88caacfb79
Merge branch 'bdm-plumb' into 'main'
...
Create and install a BridgeDescMgr when we bootstrap
Closes #631
See merge request tpo/core/arti!852
2022-11-15 13:01:15 +00:00
Ian Jackson
b7441c9804
bridges: Create and install a BridgeDescMgr when we bootstrap
2022-11-15 12:08:21 +00:00
Ian Jackson
a565e3381f
arti-client: Store a handle to the DirMgrStore in TorClient (fmt)
...
rustfmt only.
2022-11-15 12:08:21 +00:00
Ian Jackson
63c463944d
arti-client: Store a handle to the DirMgrStore in TorClient
...
We'll need this shortly.
2022-11-15 12:08:21 +00:00
Ian Jackson
647610f2f9
arti-client: Store a handle to the guardmgr in TorClient
...
We'll need this shortly.
2022-11-15 12:08:20 +00:00
Nick Mathewson
79a09ae379
Merge branch 'make_bridges_work' into 'main'
...
Bugfix: preserve active_set when loading guards
See merge request tpo/core/arti!848
2022-11-14 19:40:26 +00:00
Nick Mathewson
2f5f066d85
Merge branch 'report_missing_descs' into 'main'
...
GuardMgr: Update desired bridge descs from 'update' function.
Closes #622
See merge request tpo/core/arti!847
2022-11-14 19:15:12 +00:00
Nick Mathewson
ec2e432bee
Preserve active_set when loading guards.
2022-11-14 13:50:59 -05:00
Nick Mathewson
92115aa366
GuardMgr: Update desired bridge descs from 'update' function.
...
There are some new TODOs here for us to think about, but I think
this will give us something to test.
2022-11-14 13:36:10 -05:00
Nick Mathewson
0f4c7a477a
GuardSet: Add a method to report which bridge descs we want.
2022-11-14 13:36:10 -05:00
Ian Jackson
b41becec56
Merge branch 'guardmgr' into 'main'
...
Move guardmgr creation to arti-client, rather than within circmgr
See merge request tpo/core/arti!850
2022-11-14 17:01:31 +00:00
Ian Jackson
58fc19dc8d
Merge branch 'store3' into 'main'
...
dirmgr: Expopse DirMgrStore
See merge request tpo/core/arti!851
2022-11-14 17:01:10 +00:00
Ian Jackson
7efbc600c0
Merge branch 'bdm-dormant' into 'main'
...
bridge descriptor dormancy: Define an enum and semantics
See merge request tpo/core/arti!845
2022-11-14 17:00:40 +00:00
Ian Jackson
ed4006c87c
Move GuardMgr::new call to arti_client::TorClient (fmt)
...
rustfmt only, broken out to ease review.
2022-11-14 15:52:30 +00:00
Ian Jackson
525c452e77
Move GuardMgr::new call to arti_client::TorClient
...
Having this done within circmgr was irregular - most of our other key
buildup functions are done in TorClient::create_inner.
It is also inconvenient, as it buries the guardmgr within the circmgr.
2022-11-14 15:50:07 +00:00
Ian Jackson
92939439a6
dirmgr Store: Have constructors take DirMgrStore
...
Now the Store is constructed by arti_client, solving the problem
described here
https://gitlab.torproject.org/tpo/core/arti/-/issues/631#note_2853665
but in a different way.
2022-11-14 15:48:17 +00:00
Ian Jackson
5e16c55f9e
dirmgr Store: Introduce DirMgrStore and use for BridgeDescMgr (fmt)
...
rustfmt only, broken out to ease review.
2022-11-14 15:48:17 +00:00
Ian Jackson
cf362f9806
dirmgr Store: Introduce DirMgrStore and use for BridgeDescMgr
...
We are going to change DirMgr's constructors to also take a DirMgrStore.
2022-11-14 15:48:17 +00:00
Ian Jackson
d9f231e099
dirmgr Store: Abolish redundant trait impl
2022-11-14 15:47:04 +00:00
Ian Jackson
527ab06376
dirmgr Store: Use `**` syntax and deref to trait objects
...
This will allow us to get rid of a needless trait impl.
2022-11-14 15:47:04 +00:00
Ian Jackson
bf7d45b7b9
dirmgr Store: Move Send and 'static bounds to Store trait
...
This seems tidier to me.
(It saved a lot of typing when I was trying to make some complicated
pub supertrait with sealed private supertrait, but apparently not
now.)
2022-11-14 15:33:58 +00:00
Nick Mathewson
d232a7abbb
Merge branch 'arnabanimesh-main-patch-72156' into 'main'
...
Fix Windows shortcut target
See merge request tpo/core/arti!849
2022-11-13 19:02:57 +00:00
arnabanimesh
91be995588
Fix Windows shortcut target
2022-11-13 16:05:24 +00:00
Ian Jackson
9ecda958a4
Document Clone semantics of GuardMgr and DirMgr
2022-11-11 16:55:56 +00:00
Ian Jackson
9a979cf2c4
cfg-ify an import
2022-11-11 16:54:01 +00:00
Ian Jackson
c6234428e3
bridge descriptor dormancy: Accept the dormancy value
...
But right now, don't do anything with it. That will come in a future MR.
2022-11-11 15:34:35 +00:00
Ian Jackson
eeb6d52678
bridge descriptor dormancy: Add a TODO for this enum
2022-11-11 15:26:42 +00:00
eta
b1cc1e2065
Merge branch 'workaround_545' into 'main'
...
Temporarily disable it_cancels_delayed_firings.
See merge request tpo/core/arti!846
2022-11-11 11:16:33 +00:00
Nick Mathewson
9c9f9bbd25
Merge branch 'guardmgr-todo-misc' into 'main'
...
Resolve most "TODO pt-client" comments in GuardMgr
See merge request tpo/core/arti!840
2022-11-10 17:50:34 +00:00
Nick Mathewson
b91f7d61b3
GuardMgr: Explain why we timestamp BridgeSets as we do.
2022-11-10 12:11:28 -05:00
Nick Mathewson
f5a5e310a8
GuardMgr: Downgrade a pt-client TODO about an internal API
2022-11-10 12:11:28 -05:00
Nick Mathewson
8cf04d2a38
GuardMgr Document why a BridgeSet has trivial weight thresholds.
...
This is the only way I could find in which parameter interpretation
differs between bridge guards and relay guards; with it documented,
I can remove a TODO about identifying such ways.
2022-11-10 12:11:28 -05:00
Nick Mathewson
01def7cf86
GuardMgr: once more, fix our n_primary_dir_info check.
...
Have the check only apply to non-bridge universes, and explain why
in a bunch more comments.
2022-11-10 12:11:28 -05:00
Nick Mathewson
11e83d8069
GuardMgr: remove redundant call to extend_sample_as_needed
...
Previously we would call extend_sample_as_needed in only two places,
one of which called the other unconditionally. That's obviously not
necessary.
I've selected just one of them (`update_guardset_internal`) since it
fits better with the theme if that function. I've added comments
explaining what is going on.
This commit also introduces a yes/no enum for "were any guards added
while extending this set". Formerly we had a boolean, but it got
passed around so many times that I think its intent became obscure.
2022-11-10 12:11:28 -05:00
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