Nick Mathewson
a1c4d5a110
Merge remote-tracking branch 'origin/mr/16' into main
2021-02-26 08:16:10 -05:00
George Kadianakis
8e97237cd1
Refactor StreamMap methods to use HashMap::Entry
2021-02-26 14:16:35 +02:00
Nick Mathewson
b8956b6bd8
Move .onion check into TorClient.
2021-02-25 15:01:54 -05:00
Nick Mathewson
cf474e17ec
Clean-ups for documentations and lints in tor-client
2021-02-25 14:55:48 -05:00
Nick Mathewson
5da9186d31
Use a ConnectPref type for TorClient::connect, simplify APIs a bit, doc some.
2021-02-25 14:47:43 -05:00
Nick Mathewson
920e5036cb
Restore code in proxy.rs so that socks timeout errors work again
...
This isn't pretty, since it now has to use anyhow::downcast_ref().
I've noted a TODO about maybe not using anyhow::Error for this case.
2021-02-25 13:54:05 -05:00
Nick Mathewson
7133b9900b
Start refactoring the tor-client crate.
...
This commit splits the proxy and client code into a proper module,
and keeps a stripped down version of the main.rs file.
2021-02-25 13:49:04 -05:00
Nick Mathewson
9f473b2bbf
run cargo fix --edition-idioms
2021-02-25 09:06:42 -05:00
Nick Mathewson
7a5cfa4010
Use futures::join!() to simplify test_create().
2021-02-23 16:47:50 -05:00
Nick Mathewson
568567c5e0
Update to latest futures, once_cell
2021-02-23 15:54:29 -05:00
Nick Mathewson
09e60de858
Fix an intermittent test failure on int overflow.
2021-02-19 09:42:05 -05:00
Nick Mathewson
ab9d4a2229
Update some dependencies.
2021-02-19 09:39:23 -05:00
Nick Mathewson
afdcd69e03
Make first-level directory retry logic configurable.
2021-02-17 11:55:39 -05:00
Nick Mathewson
d8d2c0f79c
Make our initial bootstrap retry schedule configurarable
2021-02-17 11:25:57 -05:00
Nick Mathewson
bd6625174e
tor-dirmgr: simplify config.rs a bit.
2021-02-16 13:37:20 -05:00
Nick Mathewson
ddf994acc5
Add support to override network parameters in the configuration.
2021-02-16 13:29:46 -05:00
Nick Mathewson
c9b9286fa9
Add some tests for tor_config::CfgPath
2021-02-12 13:13:57 -05:00
Nick Mathewson
94901ec355
Apply "deny_unknown_fields" to configuration types.
2021-02-12 11:26:00 -05:00
Nick Mathewson
209d1df242
Remove fallback to .arti/cache for cache directory
2021-02-12 10:59:06 -05:00
Nick Mathewson
d8c1e7f0cf
Implement storage-directory configuration.
...
This affects the cache_dir and the as-yet-unused state_dir. It uses
the shellexpand and directories crates so that the default values
can be constant strings that use variables to refer to the right
default locations.
2021-02-12 10:54:24 -05:00
Nick Mathewson
32c857f71a
Add comments to default config files
2021-02-11 14:09:39 -05:00
Nick Mathewson
aeb410b915
Make authorities and fallbacks configurable.
...
This commit adds configuration options for these values, with the
right defaults, and uses those options instead of built-in functions
to set them.
We also remove the function to extract information from chutney
directories: now that arti is configurable, it can be chutney's job
to make its own network configurations.
2021-02-11 13:08:46 -05:00
Nick Mathewson
59fb158cc2
Merge branch 'main' of gitlab.torproject.org:/tpo/core/arti
2021-02-10 19:25:30 -05:00
Nick Mathewson
e1c3f550d8
upgrade a few dependencies
2021-02-10 18:23:38 -05:00
Nick Mathewson
515c002c15
Add serde implementations for identity key types.
2021-02-10 18:15:45 -05:00
Nick Mathewson
bf64b335e1
Add a test to make sure defaults are parseable.
2021-02-10 15:00:21 -05:00
Nick Mathewson
c35f72082d
Move defaults into a toml file.
2021-02-10 14:33:55 -05:00
Nick Mathewson
106c9097ff
Recommend running arti build with --release
2021-02-09 09:31:18 -05:00
Nick Mathewson
2282a37502
Merge remote-tracking branch 'origin/mr/14' into main
2021-02-09 09:27:14 -05:00
George Kadianakis
9ec905e8d0
Add a rough CONTRIBUTING.md file with some dogfooding instructions.
2021-02-08 20:39:52 +02:00
Nick Mathewson
829e85d2e4
Merge commit '65da0f5da06ade6185dfacd41980ae3d3620458a' into main
2021-02-08 13:25:41 -05:00
George Kadianakis
65da0f5da0
Simplify error checking in begin_data_stream().
2021-02-08 20:23:46 +02:00
Nick Mathewson
475675d661
Merge remote-tracking branch 'origin/mr/13' into main
2021-02-08 11:00:12 -05:00
George Kadianakis
bd4169e7d2
Send back the right SOCKS reply in case of a timeout
2021-02-06 00:11:37 +02:00
George Kadianakis
92e678be6a
Implement timeout for new streams (set to 120 seconds).
2021-02-05 23:38:32 +02:00
Nick Mathewson
6a30f40726
Remove the TODO file in favor of gitlab.
2021-02-05 13:50:48 -05:00
Nick Mathewson
b3ae88cf70
Whoops, we were using 9150 for now.
2021-02-02 13:41:20 -05:00
Nick Mathewson
66ffa44512
Initial support for configuration from file and/or command-line.
2021-02-02 13:26:02 -05:00
Nick Mathewson
6f28f7dea5
Rename client-demo to tor-client.
2021-02-02 09:27:38 -05:00
Nick Mathewson
243880473f
bump serde and log
2021-02-01 16:39:07 -05:00
Nick Mathewson
c3c6e6b660
Start a 'tor-config' crate
...
This crate is mainly intended to wrap the config.rs code if
necessary, and to give a way for interacting with it on the command
line.
2021-02-01 12:43:09 -05:00
Nick Mathewson
50da094373
Merge remote-tracking branch 'origin/mr/12' into main
2021-01-27 07:39:36 -05:00
Nick Mathewson
a36fadefae
A few more tests in request.rs
2021-01-26 12:45:09 -05:00
Nick Mathewson
680efe169c
More logging in circmgr.
2021-01-26 09:13:27 -05:00
Nick Mathewson
c5799e136f
Check declared post-digest on consensus diffs.
2021-01-25 16:51:56 -05:00
Nick Mathewson
e11bb47d5b
Don't give up easily on initial bootstrap attempts.
2021-01-25 16:23:43 -05:00
Nick Mathewson
4ba7a89a3f
Resolve a few more XXX-A1 comments in dirmgr.
2021-01-25 16:12:56 -05:00
Nick Mathewson
ca8646bc0c
Remove some not-necessary XXX-A1s in sqlite.rs
2021-01-25 14:23:33 -05:00
Nick Mathewson
88e9db7bc2
dirmgr: fix usage and meaning of `pending`.
...
The documentation and implementation diverged; the documentation was
correct.
2021-01-25 14:19:04 -05:00
Nick Mathewson
c16412e372
Detect consensuses that are signed by the wrong authorities.
...
With this patch we don't consider a consensus to be even potentially
well-signed if the authorities that are listed as signing it don't
contain enough authorities we believe in. Otherwise, we'd just try
fetching certs for them and failing forever.
(I found this by switching from a chutney network to the main
network without cleaning out my cache.)
Closes #44
2021-01-25 14:08:47 -05:00