Commit Graph

3755 Commits

Author SHA1 Message Date
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
hiro d363ae0f73 Add an error type check in test_get_decompressor_err in tor-dirclient 2021-01-25 18:59:04 +01:00
Nick Mathewson 5916adac88 Function to see whether the authorities on a netstatus are correct.
We should find out if we believe in the authorities before we even
think of downloading their certs.
2021-01-25 11:22:33 -05:00
Nick Mathewson 1a497b04db dirmgr: Extra explanatory comments.
Also replace some "disk" with "cache" in log messages
2021-01-25 10:32:25 -05:00
hiro 5cd977c752 Add a test for consensus requests in tor-dirclient. 2021-01-22 21:46:18 +01:00
Nick Mathewson 789640ed53 Fix a test in tor-dirclient 2021-01-21 12:10:17 -05:00
Nick Mathewson 34bf6f0658 Merge remote-tracking branch 'origin/mr/10' into main 2021-01-21 11:59:14 -05:00
Kushal Das e95c88f984
Reformats the code and removes extra return
Based rust nightly cargo fmt.
2021-01-21 22:14:21 +05:30
Kushal Das 63a1ad9655
Adds decompress_in_parts_zstd test
Now we are testing decompression of the input via calling
the process method 3 times. We get the final decompressed output
only after the third call.
2021-01-21 22:04:54 +05:30
Kushal Das d8184e7610
Adds decompression test for zstd
Tests the decompression of the whole input in one go.
2021-01-21 21:52:29 +05:30
Kushal Das 55f5d2aa6a
Adds zstd decompression implementation for dirclient
Adds dependency to zstd crate.
2021-01-21 21:03:45 +05:30
Nick Mathewson 8e2cc78a45 Add a test for encoding authcert requests 2021-01-21 09:42:58 -05:00
Nick Mathewson b1770603bb Add a little testing in tor-dirclient 2021-01-21 09:22:31 -05:00
Nick Mathewson 3f455e6f30 require latest futures crate 2021-01-15 17:05:05 -05:00
Nick Mathewson a27eeb1e61 Migrate from futures_codec to asynchronous_codec.
asynchronous_codec is a fork of futures_codec that is up-to-date on
its dependencies.

This migration allows us to upgrade to the current version of the
bytes crate.
2021-01-15 17:01:07 -05:00
Nick Mathewson e2997477a8 Remove unused futures_codec in tor-cell/fuzz 2021-01-15 16:11:34 -05:00
Nick Mathewson a499de3ab9 Upgrade crypto dependencies. 2021-01-13 08:18:21 -05:00
Nick Mathewson fa57fb4995 Upgrade a few more dependencies. 2021-01-13 08:17:14 -05:00
Nick Mathewson 7e843de2c8 Upgrade a few dependencies. 2021-01-13 08:14:28 -05:00
Nick Mathewson 24d6b38586 Fix some clippy warnings from nightly. 2021-01-02 13:42:07 -05:00
Nick Mathewson f01d641ec8 cargo upgrade. 2020-12-30 15:59:33 -05:00
Nick Mathewson a052f1232b Merge remote-tracking branch 'origin/mr/9' into main 2020-12-29 15:00:28 -05:00