Ian Jackson
7135b7c4c7
channel padding: Make Parameters a pub struct with builder
...
chanmgr is going to want to make one of these from a NetDir.
2022-06-21 19:19:22 +01:00
Ian Jackson
db4ea619f5
tor-chanmgr: tests: Have unwrap_open return a (mut) reference
...
This avoids confusing bugs where you try to modify the result and
nothing happens!
2022-06-21 19:19:22 +01:00
Nick Mathewson
d95f597323
Run cargo update in preparation for release on Friday
2022-06-21 08:54:12 -04:00
eta
073b64b155
Merge branch 'main' into 'main'
...
Updated the warning message providing additional information about the type of the proxy port.
See merge request tpo/core/arti!596
2022-06-21 12:47:46 +00:00
0x4ndy
3175d96236
Updated the warning message providing additional information about the type of the proxy port.
2022-06-21 12:47:46 +00:00
Ian Jackson
a3d8a425c4
Merge branch 'ring_out_the_old' into 'main'
...
Enforce no-ring-in-arti/full (and make it true)
See merge request tpo/core/arti!592
2022-06-17 13:42:38 +00:00
Nick Mathewson
9ae57e8bc4
Merge branch 'reachable_addrs_v2' into 'main'
...
Implement support for reachable_addrs
Closes #491 and #93
See merge request tpo/core/arti!583
2022-06-17 13:16:16 +00:00
Nick Mathewson
f4c9b9cc1e
Rename guardset-selection function.
...
Also, improve its documentation.
2022-06-17 08:47:57 -04:00
Nick Mathewson
03568cd4a5
Rename pick_guard, pick_guard_ext.
...
Now the primary exposed function is `pick_guard` again.
This commit is just function renaming.
2022-06-17 08:47:57 -04:00
Nick Mathewson
1be44891c9
Refactor and document issues with modify_hop.
...
At the site of modify_hop, we now have a comment explaining the
internal-error issue.
To make the internal error less likely, we lower the modify_hop call
in lib.rs into GuardSet, where it can make sure it's looking at the
same filter as was used to select the guard.
The function name "pick_guard_ext" is not permanent; I'm going to
rename it in the next commit.
2022-06-17 08:47:57 -04:00
Nick Mathewson
96dfa97473
API-fix for extend_sample_as_needed.
...
Previously, the API said "you need to call this in a loop till it
returns false". We did that in one place, but not another.
With the introduction of filters, forgetting to loop here becomes a
bug: so instead, change the behavior of extend_sample_as_needed so
it handles looping itself.
2022-06-17 08:47:57 -04:00
Nick Mathewson
a92dfa0b2a
Remove some outdated comments.
...
These all say, in one form or another, "there is no guard filtering;
there is only one selection". That's now false.
2022-06-17 08:47:57 -04:00
Nick Mathewson
89f9e1decb
Tweak parameters in guardmgr tests to improve testnet behavior.
...
The fake network we construct for these tests is small in ways that
can sometimes cause weird behavior with guard filters. We fix this
by adjusting the parameters of the guard selection algorithm
accordingly in the tests.
With these new parameters, #491 no longer occurs.
This commit also adds comments to explain why the parameters are set
as they are.
Closes #491 .
2022-06-17 08:47:57 -04:00
Nick Mathewson
34e8e208cc
CircMgr: Enable reachable_addrs filter.
2022-06-17 08:47:57 -04:00
Nick Mathewson
1c5f540dc8
Add a configuration option for reachable_addrs
...
(This doesn't do anything yet.)
2022-06-17 08:47:57 -04:00
Nick Mathewson
fb672dc688
NetDoc: Make AddrPortPattern implement serde traits
...
I'm using serde_with here to just re-use the Display and FromStr
implementations, since those are what has proven easier to type in
the past.
2022-06-17 08:47:57 -04:00
Nick Mathewson
48a86506be
GuardMgr: Support for multiple guard sets
...
guard-spec.txt specifies that we have multiple separate samples of
guards that we can use depending on whether the filter is
restrictive or not. Here we implement the rules for switching
between samples.
2022-06-17 08:47:57 -04:00
Nick Mathewson
e098a5a303
Move set_filter into GuardMgrInner.
...
Convert its argument type to Option<&NetDir> to better match the
rest of the API.
2022-06-17 08:47:57 -04:00
Nick Mathewson
a720f4f667
GuardMgr: Function to tell how permissive a filter is.
...
When we're filtering guards, we have to check whether the filter is
"restrictive": if it forbids most of the guards (by bandwidth), we
keep its guards separated from the main set. If it is
super-restrictive, we also warn.
This functionality is specified in guard-spec.txt.
2022-06-17 08:47:57 -04:00
Nick Mathewson
19fa946fc7
Make AddrPortPattern and friends implement Eq and PartialEq
2022-06-17 08:46:16 -04:00
Nick Mathewson
e3c2a86195
GuardMgr: Also apply filters to fallback directories.
2022-06-17 08:46:16 -04:00
Nick Mathewson
a189aaf1fb
GuardMgr: remove disallowed addresses from returned FirstHops.
...
Since a guard can have a bunch of addresses, and the guard is
permitted if any one of those addresses is permitted, then we might
decide to use a guard with some non-permitted addresses. Thus, we
need to filter those addresses before returning the view of the
guard as a FirstHop.
2022-06-17 08:46:16 -04:00
Nick Mathewson
23218fe037
GuardMgr: Remove old testing filter variant.
...
We don't need to restrict based on bits in the key id any longer,
since we have a real filter.
2022-06-17 08:46:16 -04:00
Nick Mathewson
9c4f31edc1
GuardMgr: Add a new filter type based on reachable addresses.
2022-06-17 08:46:16 -04:00
Nick Mathewson
801b6bec5f
Guardmgr: Change the GuardFilter API.
...
The guard filter is now a set of restrictions that can be placed on
allowable guards.
2022-06-17 08:46:16 -04:00
Nick Mathewson
bf15abbb97
Avoid matching crate names by prefix.
2022-06-17 08:41:38 -04:00
Nick Mathewson
5509bd0269
Merge branch 'config-fix2' into 'main'
...
Use impl_standard_builder more and remove manual Default/builder impls
See merge request tpo/core/arti!594
2022-06-16 20:30:34 +00:00
Nick Mathewson
677f1b8af0
Update check_tree to better detect errors in cargo-tree.
2022-06-16 16:13:11 -04:00
Nick Mathewson
349f9d5000
Don't install cargo-tree: It's built-in.
2022-06-16 15:54:21 -04:00
Ian Jackson
44659ebb8b
tor-proto: channel: Tell clippy it's ok to print in tests
2022-06-16 19:33:32 +01:00
Ian Jackson
61bd8b810a
Merge branch 'upgrade_float_eq' into 'main'
...
Upgrade to float_eq 1.0.0
See merge request tpo/core/arti!591
2022-06-16 17:26:04 +00:00
Ian Jackson
db51bdcbc1
Merge branch 'config-fix' into 'main'
...
Config handling and logging fixes
Closes #480
See merge request tpo/core/arti!589
2022-06-16 15:46:18 +00:00
Ian Jackson
ed62a575d3
arti: cfg: Remove another needless borrow
2022-06-16 16:08:10 +01:00
Ian Jackson
2ca2c03059
impl_standard_builder: Use for tor_dirmgr::Authority
2022-06-16 15:42:06 +01:00
Ian Jackson
e004316942
impl_standard_builder: Use for tor_guardmgr::FallbackDir
2022-06-16 15:42:06 +01:00
Ian Jackson
17caebd284
impl_standard_builder: Use for tor_dirmgr::DownloadSchedule
2022-06-16 15:42:06 +01:00
Ian Jackson
c466f13ce3
impl_standard_builder: Use for arti::logging::LogfileConfig
2022-06-16 15:42:06 +01:00
Ian Jackson
90ba8b15de
impl_standard_builder: Allow for !Default
2022-06-16 15:42:06 +01:00
Ian Jackson
c5bbaf470a
arti: logging config: Replace a manual Debug impl
2022-06-16 15:27:00 +01:00
Ian Jackson
8b724d40f8
impl_standard_builder: Use for tor_dirmgr::DownloadScheduleConfig
2022-06-16 15:27:00 +01:00
Ian Jackson
2ab5c0861e
impl_standard_builder: Use for tor_dirmgr::NetworkConfig
2022-06-16 15:27:00 +01:00
Ian Jackson
e32210a398
impl_standard_builder: Use for tor_dirmgr::DirSkewTolerance
2022-06-16 15:27:00 +01:00
Ian Jackson
c895057cb9
tor-config: impl_standard_builder: handle contexts with local Result
2022-06-16 15:27:00 +01:00
Nick Mathewson
e1fc59ba5f
Merge branch 'accel-features' into 'main'
...
Top-level (arti and arti-client) features to enable crypto acceleration
Closes #441
See merge request tpo/core/arti!590
2022-06-16 14:19:32 +00:00
Nick Mathewson
60eaabfb37
gitlab-ci: Use lowercase tpa tag.
...
Our gitlab admins are standardizing on this variant.
2022-06-16 10:01:07 -04:00
Ian Jackson
fc3f36e9c9
arti cfg tests: Remove a redundant line that shadows an earlier binding
...
Prompted by review
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/589#note_2813596
2022-06-16 14:34:43 +01:00
eta
ed3baea683
Fix grammar error
2022-06-16 14:34:43 +01:00
Ian Jackson
a0935ca6ee
arti: Enable some pre-config logging
2022-06-16 14:34:43 +01:00
Ian Jackson
d57fc34841
arti: Introduce closure which will be used for pre-config logging
...
Right now this is an IEFI and therefore a no-op.
2022-06-16 14:34:43 +01:00
Ian Jackson
1332e02b61
arti cfg tests: Test that example config works as-is
...
It contains only sections, but we want to detect when that is a problem!
2022-06-16 14:34:43 +01:00