Commit Graph

4997 Commits

Author SHA1 Message Date
Nick Mathewson 9229e1a59b arti: Split long lines in Cargo.toml
This will make the next commit easier to review.
2022-11-18 08:53:47 -05:00
Nick Mathewson f1f6005474 arti-client: Mark "bridge-client" and "pt-client" as non-experimental 2022-11-18 08:53:47 -05:00
Nick Mathewson 09591bcc5a arti-client: split long lines in Cargo.toml
Doing this separately to make the next commit easier to read.
2022-11-18 08:53:47 -05:00
Nick Mathewson 9f661e264f dirmgr: make "bridge-client" non-experimental. 2022-11-18 08:53:47 -05:00
Nick Mathewson 471cdc77f2 guardmgr: Make bridge-client and pt-client non-experimental 2022-11-18 08:53:47 -05:00
Nick Mathewson 1928fd0b72 circmgr: Make "specific-relay" non-experimental. 2022-11-18 08:53:47 -05:00
Nick Mathewson b5a9e0b475 chanmgr: Make "pt-client" non-experimental. 2022-11-18 08:53:47 -05:00
Nick Mathewson cf152c5ed6 linkspec: Make "pt-client" non-experimental. 2022-11-16 12:26:31 -05:00
eta 09b918515c Merge branch 'ptmgr-config' into 'main'
tor-ptmgr: make configuration use builders, plumb into arti-client

See merge request tpo/core/arti!823
2022-11-16 12:12:35 +00:00
Ian Jackson b46d1600e7 Merge branch 'real_netdoc_pos' into 'main'
Replace `Option<Pos>` with `Pos` in `ParseError`.

Closes #640

See merge request tpo/core/arti!859
2022-11-16 11:50:20 +00:00
Ian Jackson d7dc02968f pt config, arti cfg test: Expect bridges.transports to be missing
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/823#note_2854365
2022-11-16 11:39:25 +00:00
Ian Jackson 4fe5e8fcaa arti cfg test: Coalesce expect_missing
If there are subkeys which are covered by also expected_missing
superkeys, delete them, since we expect the superkey to be missing, so
the subkey won't show up.
2022-11-16 11:39:25 +00:00
eta 1c9f6fb179 tor-ptmgr: make configuration use builders, plumb into arti-client
This brings the draft configuration mechanisms in tor-ptmgr in line with
the config in other crates, using builders. It also plumbs the config
type through into the main `arti-client` config, and adds some example
lines to `arti-example-config.toml`.
2022-11-16 11:39:25 +00:00
Nick Mathewson 938bc06b52 Merge branch 'remove_netdoc_todo' into 'main'
Remove a `TODO pt-client` in netdoc.

See merge request tpo/core/arti!860
2022-11-15 22:40:31 +00:00
Nick Mathewson 7a42cb0e45 Remove a `TODO pt-client` in netdoc.
This issue is now torspec!94.
2022-11-15 17:19:26 -05:00
Nick Mathewson 39615516fd Replace `Option<Pos>` with `Pos` in `ParseError`.
We already have `Pos::Unknown` for an error at an unknown
location and `Pos::None` for an error where no location is
sensible. There's no reason to have an additional `Option` here.

Additionally, the use of `Option` gave us a bug where our old
`ParseError::at_pos()` method didn't actually set the position
unless the position was already set.  That's not what we want!

Fixes #640.

Finally, we have to fix a test that was a bit broken because it was
working around #640.
2022-11-15 16:58:23 -05:00
Nick Mathewson 0378a14014 Merge branch 'fix_bridgeconf_lookup' into 'main'
Allow a subset-only ChanMethod match when looking up a BridgeConfig

Closes #642

See merge request tpo/core/arti!858
2022-11-15 19:18:51 +00:00
Ian Jackson 86c7a2da7f Merge branch 'cfg-doc' into 'main'
arti cfg test: Add more documentation

See merge request tpo/core/arti!856
2022-11-15 19:05:12 +00:00
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