Nick Mathewson
566b7a165d
Use anyhow::Context in tor-chanmgr.
2020-12-11 13:23:07 -05:00
Nick Mathewson
66a304a0bd
Add more anyhow Contexts in client-main
2020-12-11 13:18:10 -05:00
Nick Mathewson
9a68054c4b
Do not keep a NetDir alive just because we have a stream.
2020-12-10 16:50:18 -05:00
owen66
18915e84d4
Fixup! issue #34 : adding support for xz2
2020-12-10 20:17:04 +00:00
Nick Mathewson
9ea02c066a
Merge remote-tracking branch 'origin/mr/5' into main
2020-12-10 12:14:46 -05:00
George Kadianakis
cc91b3ce2b
Use anyhow crate to add extra context for various dirclient errors.
2020-12-10 17:36:18 +02:00
Nick Mathewson
381530aa84
Add a couple of anyhow contexts in main.rs
2020-12-10 09:53:48 -05:00
Nick Mathewson
90fc798646
Fix some rustdoc warnings.
2020-12-09 09:46:39 -05:00
Nick Mathewson
cfdedb995f
upgrade rusqlite
2020-12-08 17:26:49 -05:00
Nick Mathewson
17c84fd59e
upgrade to require latest anyhow.
2020-12-08 17:26:19 -05:00
Nick Mathewson
b095f3325e
It is an internal error if we do a TLS connection and get no cert.
2020-12-08 17:21:04 -05:00
Nick Mathewson
26a0654b05
Make RSAIdentity implement Copy.
2020-12-08 17:07:30 -05:00
Nick Mathewson
0caee4718f
Document a problem on network transition
2020-12-08 16:59:16 -05:00
Nick Mathewson
8d6087426e
De-parameterize ChanMgr and everything that wraps it.
...
This makes a whole lot of our code simpler, and makes it so that
CircMgr and DirMgr no longer need to have anything parameterized
over transports, either.
Instead of boxing Transport inside of ChanMgr, I've made a new
Connection trait that goes from a ChanTarget* straight to a Channel.
This lets us avoid having to box the intermediate TLS object.
[*] Actually, a copy of the information from a ChanTarget. Ick, but
I had to make a copy to avoid parameterizing
Connecter::build_channel.
2020-12-08 16:29:18 -05:00
Nick Mathewson
5fc116ad7a
Tolerate attempt to write a non-UTF-8 HTTP header.
...
previously, we would panic.
2020-12-07 21:22:12 -05:00
Nick Mathewson
9419f6d699
Use uniform weight all measured weights are zero.
2020-12-07 21:07:41 -05:00
Nick Mathewson
bdc7908c7f
Fix a logic bug in the --chutney-dir option.
...
It was recording the dirport for each chutney authority as though it
were an orport. That obviously won't work.
Closes arti#45.
2020-12-07 16:54:18 -05:00
Nick Mathewson
8301ae699b
gitlab-ci.yml -- on rust-latest, turn all clippy warnings into errors.
2020-12-07 16:18:21 -05:00
Nick Mathewson
a1f1dac4eb
Resolve a few nightly-only clippy issues
2020-12-07 16:14:36 -05:00
Nick Mathewson
6f7d48eb1c
Merge branch 'moar_gitlab_ci' into main
2020-12-07 16:08:03 -05:00
Nick Mathewson
a52585d9d6
Mark some XXXX issues as XXXX-A1.
2020-12-07 16:07:59 -05:00
Nick Mathewson
6f286ba7c2
fixup! fixup! fixup! Try adding "test --all" and "fmt" and "clippy".
2020-12-07 14:04:05 -05:00
Nick Mathewson
b5f17167c2
fixup! fixup! Try adding "test --all" and "fmt" and "clippy".
2020-12-07 12:51:03 -05:00
Nick Mathewson
09849c64f8
fixup! Try adding "test --all" and "fmt" and "clippy".
2020-12-07 12:41:28 -05:00
Nick Mathewson
fd74f6c13f
Try adding "test --all" and "fmt" and "clippy".
2020-12-07 12:16:00 -05:00
Nick Mathewson
0f963774db
Fix grammar in a log message
2020-12-07 10:21:01 -05:00
Nick Mathewson
9c96b5ea5d
Add a missing documentation comment.
2020-12-07 09:26:22 -05:00
Nick Mathewson
6f1e05a1d3
Add a few log messages about download timing.
2020-12-07 09:24:51 -05:00
Nick Mathewson
bb62dc8eb5
Merge remote-tracking branch 'origin/mr/2' into main
2020-12-07 08:39:39 -05:00
Nick Mathewson
2d19985cb5
Merge branch 'mr_4_squashed' into main
2020-12-07 08:35:11 -05:00
Alexander Færøy
1923c7820f
Let's try explicit target?
2020-12-07 08:35:02 -05:00
Alexander Færøy
dee4d7bf72
No need to install Husky hooks on CI.
2020-12-07 08:35:02 -05:00
Nick Mathewson
57eea69f52
Teach updater to download microdescriptors for usable directory.
...
This follows a three-phase process: We are either fetching
microdescriptors, waiting for the time to download the next
consensus, or fetching the next consensus and making it usable.
We can stop fetching microdescriptors for two reasons: by having no
more mds that we need to download, or by running out of time in
which the current consensus is usable.
2020-12-07 08:29:35 -05:00
Nick Mathewson
915515442f
Reuse microdescriptors from previous consensus
...
Previously, we'd re-parse them from the database every time we got a
new consensus.
2020-12-06 11:42:50 -05:00
Nick Mathewson
5e0b8380e2
Refactor NetDir a little for space savings and updating
...
Rather than having the NetDir own its microdescs and consensus, give
it Arc<>s for them. This way, we can do a shallow copy of a NetDir
to work around mutability issues that would otherwise make it hard
to add microdescs to a netdir on the fly.
2020-12-06 11:13:10 -05:00
Alexander Færøy
6fa8f2c0f5
No need to install libsqlite3-dev on CI servers.
2020-12-06 16:01:06 +00:00
Alexander Færøy
3bccafd6b9
Also install libsqlite3-dev.
2020-12-06 01:05:15 +00:00
Alexander Færøy
128f8c31c0
Add Gitlab CI support.
2020-12-06 00:16:34 +00:00
Alexander Færøy
0eedd017ce
Fix typo in pick_path().
...
This patch fixes a minor typo in the error case when looking for a
middle relay for a 3-hop circuit where the error message should say "No
middle relay found" and not "No exit relay found".
2020-12-05 22:45:43 +00:00
Nick Mathewson
6ddf55f799
Enforce that the periods in a consensus lifetime are nonempty.
...
To be valid, a lifetime must have valid_after < fresh_until <
valid_until.
2020-12-04 15:00:06 -05:00
Nick Mathewson
402d501020
Update a few comments.
2020-12-04 14:03:05 -05:00
Nick Mathewson
b56223f382
Dirmgr: Add a feature to keep the directory up-to-date.
...
This required me to move the sqlite connection from a rwlock into mutex,
since it isn't actually Sync.
2020-12-04 13:53:51 -05:00
Nick Mathewson
bb01a55a8c
authcert: move location into UncheckedAuthCert.
...
This lets us make AuthCert Send and Sync.
2020-12-04 13:17:24 -05:00
Nick Mathewson
58869194f6
tor-dirclient: tweak so that its future is Send.
2020-12-04 13:16:52 -05:00
Nick Mathewson
9418838456
Fix a copy-paste bug in netstatus::Lifetime
2020-12-04 13:15:58 -05:00
Nick Mathewson
4ac4f5496e
rtcompat: add a function to sleep until a given wallclock time
...
(We can't just subtract and sleep, since we should be at least
somewhat concerned about clock jumps.)
2020-12-04 13:12:45 -05:00
Nick Mathewson
40ac33bde2
Upgrade async-io
2020-12-03 13:05:51 -05:00
Nick Mathewson
be23950f37
TODO
2020-12-03 10:12:54 -05:00
Nick Mathewson
2e0c6f900b
A few more tests for role-based weighting
2020-12-02 18:05:12 -05:00
Nick Mathewson
b793e0c075
Use bwweightscale to avoid miscalculating weights for v2dir relays
2020-12-02 17:54:22 -05:00