Commit Graph

1213 Commits

Author SHA1 Message Date
Nick Mathewson 31b66956b4 Bump tokio-related dependencies 2021-06-24 06:39:37 -04:00
YUAN LYU 92dbf20a76 Add clippy warn needless pass by value 2021-06-21 23:27:19 -04:00
YUAN LYU b830e81b7f Add clippy warn needless borrow 2021-06-21 21:34:40 -04:00
Nick Mathewson 4ca629dff7 Remove unused import. 2021-06-21 11:21:42 -04:00
Nick Mathewson bf251402d4 More tests and a little code-golf for coverage on tor-circmgr 2021-06-20 11:35:09 -04:00
Nick Mathewson 133d000c34 tor_circmgr: simplify build_circuit a bit. 2021-06-20 11:02:26 -04:00
Nick Mathewson 36b0a666cb A few tests for circparameters generation. 2021-06-19 17:21:58 -04:00
Nick Mathewson e4499fbfd3 More/better tests on tor_circmgr::mgr 2021-06-19 16:05:11 -04:00
Nick Mathewson 89de6227b8 A little testing and refactgoring in tor-circmgr. 2021-06-19 13:08:46 -04:00
Nick Mathewson 8f8a2cf4ab Misc tests in tor-proto. 2021-06-19 13:01:35 -04:00
Nick Mathewson 86f2ea1cde Remove most (all?) panics from tor-chanmgr::mgr::map
Improve testing for cases where change_state() is given a bad
function.
2021-06-19 12:12:05 -04:00
Nick Mathewson a19361c2c9 Add another entry to WANT_FROM_OTHER_CRATES 2021-06-19 11:28:36 -04:00
Nick Mathewson a6ada2d6df Cut down WANT_FROM_OTHER_CRATES 2021-06-18 08:34:59 -04:00
Nick Mathewson e6faeaa1f8 Fix some warnings about needless & from nightly clippy 2021-06-18 07:19:24 -04:00
Nick Mathewson 07dc7bf16e Upgrade phf. 2021-06-17 19:09:28 -04:00
Nick Mathewson a36626d9de Run "typos" to fix a few more typos. 2021-06-17 18:45:05 -04:00
Nick Mathewson 5c87cd1eb2 Update retry-error README 2021-06-17 18:41:47 -04:00
Nick Mathewson b994867944 Merge remote-tracking branch 'origin/mr/33' 2021-06-17 18:38:52 -04:00
Nick Mathewson f3f16cf236 Merge branch 'retry_refactor' 2021-06-17 18:37:53 -04:00
Nick Mathewson 458bc44ca9 Use retry-error in tor-circmgr. 2021-06-17 18:34:39 -04:00
Nick Mathewson 3763dab2f1 Add deduplication for retry-error 2021-06-17 16:38:20 -04:00
Nick Mathewson be86df631d Remove anyhow dependency from tor-retry, and rename it to retry-error
Now RetryError is parameterized on an underlying error type.
2021-06-17 16:09:43 -04:00
HackerNCoder 0f9001c811
Fix typos 2021-06-17 17:19:33 +00:00
Nick Mathewson 581ccac9da Try to fix a nightly rustdoc warning 2021-06-17 12:31:55 -04:00
Nick Mathewson 99a19ea0ba Revise repository-level documentation 2021-06-17 12:18:28 -04:00
Nick Mathewson 9310273448 Remove some (but not all) needless dependencies. 2021-06-17 09:09:43 -04:00
Nick Mathewson 62ee7f4acd Note a couple of more desired warnings. 2021-06-17 08:28:55 -04:00
Nick Mathewson 8424ec700b Suppress a clippy warning. 2021-06-17 08:26:34 -04:00
Nick Mathewson ed242436e0 Remove TODO as outdated. 2021-06-17 08:11:00 -04:00
Nick Mathewson 850a3c3b68 CoC: Stop saying that Arti is not official. 2021-06-17 07:50:38 -04:00
Nick Mathewson fdeb3cf474 Fix new(?) rustdoc warnings 2021-06-16 15:34:09 -04:00
Nick Mathewson 4517e6eaa2 more improvements to circmgr tests. 2021-06-16 15:22:40 -04:00
Nick Mathewson 321fd79632 Notes about badexit flag and opportunities for error 2021-06-16 15:10:26 -04:00
Nick Mathewson 1b6cf24087 More tests on circmgr::path. 2021-06-16 15:08:52 -04:00
Nick Mathewson 4e3e1982be circmgr: tests for path/dirpath.rs 2021-06-16 13:24:11 -04:00
Nick Mathewson a9086fd139 Missing feature dependency. 2021-06-16 11:40:19 -04:00
Nick Mathewson d3f27716d9 Tests for circmgr::usage 2021-06-16 11:36:50 -04:00
Nick Mathewson b6da4bb11a Expose the "construct_network()" function in tor-netdir.
This function has been used for testing tor-netdir, but it will also
be useful for testing path selection in tor-cirmgr as well.

I've put it behind a "testing" feature, since it shouldn't really be
used by most applications.
2021-06-16 10:58:48 -04:00
Nick Mathewson c67f2b2a67 tor_circmgr: even more tests 2021-06-16 10:02:51 -04:00
Nick Mathewson 66fad93f31 More tests in tor-cirmgr::mgr 2021-06-16 09:16:54 -04:00
Nick Mathewson 834d3c1855 remove now-unused imports 2021-06-14 20:20:24 -04:00
Nick Mathewson 7a8b2344a1 Comment out build_path for now.
It just duplicates TorPath::build_circuit, which is all you actually
need.
2021-06-14 16:32:16 -04:00
Nick Mathewson 561ca57282 Use FuturesUnordered, not SelectAll<Once<...>>
Closes #124
2021-06-14 12:46:32 -04:00
Nick Mathewson 83b1150c81 Enormous tor-circmgr rewrite.
As with the tor-chanmgr code, the circuit manager is now implemented
using an AbstractCircMgr type that uses traits to abstract the
particular behavior of other types that it uses.  (Specifically:
circuits, building circuits, and telling whether one circuit usage
is compatible with another.)  Abstracting out the dependencies in
this ways makes it possible to test the circuit manager without
having to actually build real circuits.

This commit also introduces new behavior for handling pending
circuit requests.  Upon getting a new request, first we check to see
if there's an existing circuit we can use.  If there isn't, we look
for pending circuits and wait for them.  If there aren't any pending
circuits we can use, we launch one or more, and wait for them.

So far, that's the same as the old behavior.  But here's a change:
if, while we are waiting for some pending circuits, a different
circuit is completed, and it's one we could use, then the task that
was building _that_ circuit will tell us: "please look at this
circuit".  This gives us better changes of getting a usable circuit
fast.

Minor changes:

* The Error type in CircMgr no longer uses anyhow; several errors
  have been simplified.

* We've gotten more formal about the relationship between circuit
  usage and target usage.
2021-06-14 12:12:31 -04:00
Nick Mathewson f3574015bc Implement Debug for ClientCirc and Channel. 2021-06-14 09:27:44 -04:00
Nick Mathewson 8e2246b009 Make a few error types implement Clone
To make this work we have to wrap std::io::Error in an Arc.  The
benefit of having these errors implement Clone is that we can
provide the same Error in response to multiple requests when they
are all waiting on the same operation.
2021-06-14 09:24:08 -04:00
Nick Mathewson 9abad8a2be linkspec: Define owned variants of ChanTarget and CircTarget. 2021-06-13 13:03:30 -04:00
Nick Mathewson 62192f3ac2 add rustdoc link to readme 2021-06-09 14:36:59 -04:00
Nick Mathewson f6f1fd41ad Remove accidentally committed graph files. 2021-06-08 09:25:50 -04:00
Nick Mathewson 0b0b00baf9 Add an XXXX to path.rs 2021-06-04 08:50:56 -04:00