Nick Mathewson
6e755eee4d
Use a slightly prettier syntax in max_weight
2020-12-02 15:27:32 -05:00
Nick Mathewson
01de0cafc5
Run cargo fix --edition-idioms
2020-12-02 15:14:29 -05:00
Nick Mathewson
aebf1fcc0d
Fix a few comments in weight.rs
2020-12-02 14:15:40 -05:00
Nick Mathewson
6f25dd05af
Use a better calculation for deciding if we have enough paths.
2020-12-02 14:09:33 -05:00
Nick Mathewson
412f1763de
Implement correct (?) weighting for path selection.
2020-12-02 13:51:19 -05:00
Nick Mathewson
4aa61322be
Fix a couple of clippy warnings in tor-dirclient.
2020-12-02 13:43:45 -05:00
Nick Mathewson
a72437a1c7
Abandon directory circuits on most kinds of directory failure.
...
(There are more cases that this _doesn't_ handle, but it's a start
for now.)
2020-12-02 09:46:35 -05:00
owen66
c9a202c7ac
issue #34 : adding support for xz2
2020-12-02 01:20:24 +00:00
Nick Mathewson
85c287c4e4
When retiring circuits, do it by ID, not by reference.
2020-12-01 16:50:51 -05:00
Nick Mathewson
0dc5c7b459
Bump to latest async-io
2020-12-01 15:21:50 -05:00
Nick Mathewson
efa6dd708b
Expose UniqId types for channels and circuits
2020-12-01 14:00:07 -05:00
Nick Mathewson
ea0cb1d2cc
Rename LogId -> UniqId.
2020-12-01 13:44:25 -05:00
Nick Mathewson
3fe97baa2a
Derive more types for circuit and channel LogIds
2020-12-01 13:21:46 -05:00
Nick Mathewson
31773e0251
Enforce uniqueness on circuit and channel logids
2020-12-01 13:20:41 -05:00
Nick Mathewson
db55c84c89
tor-dirmgr: retry up to 3 times on download failure.
2020-12-01 09:38:59 -05:00
Nick Mathewson
f5f2a648a3
tor-dirclient: add timeouts
...
This adds two timeouts in total: one for sending begin, and getting
headers, and one for getting the rest of the data.
These timeouts are way too long right now, but at least the code is
there.
2020-12-01 08:56:25 -05:00
Nick Mathewson
85cf6c09b3
Make mmap usage optional.
2020-12-01 07:56:36 -05:00
Nick Mathewson
d7b79095c8
tor-dirmgr: tests for storage.rs
2020-12-01 07:44:47 -05:00
Nick Mathewson
b0fc36c06a
Add a decorrelated-jitter implementation.
...
This is the algorithm we use on download failure to back off before
we retry.
2020-11-30 16:43:36 -05:00
Nick Mathewson
ffd4ed16a0
only expire dorectory info on a successful bootstrap.
2020-11-30 12:54:56 -05:00
Nick Mathewson
a1d02d4154
Add tests for blob_fname failing cases
2020-11-30 12:35:33 -05:00
Nick Mathewson
39bc39ddd5
More tests for sqlite.rs
2020-11-30 12:26:11 -05:00
Nick Mathewson
c3c3d24973
Initial tests for authcert storage
2020-11-30 11:59:41 -05:00
Nick Mathewson
baba0773c3
tor-dirmgr: Refactor storage not to take AuthCert type.
...
Add a new AuthCertMeta type to make it easier to test.
2020-11-30 11:26:03 -05:00
Nick Mathewson
e979bd5cb2
tor-dirmgr: Refactor storage not to take Microdesc type.
...
Since all it needs is an MDDigest, that's what it should take. This
will make it easier to test.
2020-11-30 11:11:39 -05:00
Nick Mathewson
1806135313
Add a test for sha3_dual
2020-11-30 11:00:58 -05:00
Nick Mathewson
5f446b238e
Add a few more tests for tor-certs.
2020-11-30 09:48:19 -05:00
Nick Mathewson
a3a077419a
Fix a couple of new clippy warnings.
2020-11-28 14:20:15 -05:00
Nick Mathewson
e18b4e07cb
Upgrade a couple of dependencies
2020-11-28 14:17:42 -05:00
Nick Mathewson
483fb1f7c4
Implement a maximum length for directory responses
2020-11-25 11:45:00 -05:00
Nick Mathewson
679104a516
Extract another function in tor-dirclient
2020-11-25 11:23:51 -05:00
Nick Mathewson
995f136ec1
Better error types for tor-dirclient
2020-11-25 11:11:40 -05:00
Nick Mathewson
aee76da70f
tor-dirclient: add support for partial documents.
...
Some requests are still useful when we get only a partial response
-- like those where we're asking for a bunch of documents at once.
For those, we should return any nonempty partial result.
2020-11-25 10:53:01 -05:00
Nick Mathewson
3321d72842
Document newer modules
2020-11-25 10:15:32 -05:00
Nick Mathewson
ae4e075d5d
Update README to mention current state.
2020-11-25 10:01:11 -05:00
Nick Mathewson
0b443665a8
A couple more tests in tor-cert
2020-11-25 09:10:49 -05:00
Nick Mathewson
cc55469307
Add a function to retire circuits.
2020-11-24 12:44:04 -05:00
Nick Mathewson
b9685e4efb
change default socks proxy port to 9150
2020-11-24 12:27:11 -05:00
Nick Mathewson
200a7dbd26
Drop unsupported requests (like RESOLVE)
2020-11-24 12:20:13 -05:00
Nick Mathewson
ce221476d5
Fetch microdescriptors in parallel.
2020-11-24 11:59:56 -05:00
Nick Mathewson
142116c031
A little better logging on bootstrap.
2020-11-24 10:57:20 -05:00
Nick Mathewson
ea27328c67
Make legacy-store code disabled by default.
...
In the long run we might not want it at all.
2020-11-24 10:43:16 -05:00
Nick Mathewson
2fd2c27ee5
typo fix
2020-11-24 10:42:51 -05:00
Nick Mathewson
771d49d59e
Reject .onion addresses for now.
2020-11-24 10:37:04 -05:00
Nick Mathewson
e3d4a6e114
Turn client-demo into a mostly-good client.
2020-11-24 10:33:38 -05:00
Nick Mathewson
f9d741ab36
Add a function to load a directory from cache.
2020-11-24 09:00:45 -05:00
Nick Mathewson
9749022fa2
When a consensus has enough descriptors, mark it non-pending.
2020-11-24 07:08:41 -05:00
Nick Mathewson
7af214b594
When storing consensuses, index them by the sha3 of the whole file.
2020-11-23 11:11:17 -05:00
Nick Mathewson
525f6b2bfa
Document and de-warning the rest of tor-dirmgr
2020-11-23 10:41:41 -05:00
Nick Mathewson
5f361d9529
Less copying of the authority list.
2020-11-23 09:33:43 -05:00