Commit Graph

2548 Commits

Author SHA1 Message Date
trinity-1686a ee4ea74698 attempt at making CI faster
Move rust-nightly to stage test so it runs in parallel with coverage,
which are the two longest jobs, and currently run in sequence.
Don't document dependancies, should make the step about 50% faster
Use about 12M of cache to not recompile grcov each time
Don't compile grcov with coverage, we don't need it, it's probably
slower both to compile and execute
2022-02-25 18:08:14 +01:00
Ian Jackson 0ad45d437c Merge branch 'tls-trait' into 'main'
tor-rtcompat: Provide TLS wrapping for all streams

See merge request tpo/core/arti!349
2022-02-25 11:13:34 +00:00
eta 3e37d7e105 Merge branch 'debug-datastream' into 'main'
tor-proto datastream: Do not dump packet data in DataWriterImpl

See merge request tpo/core/arti!353
2022-02-24 21:30:52 +00:00
eta 3ac6ee71c8 Merge branch 'eta/335' into 'main'
arti-client: Unlock the state manager on failure to bootstrap

Closes #335

See merge request tpo/core/arti!334
2022-02-24 21:00:33 +00:00
eta 8f9831b219 Merge branch 'socks-version-is-http' into 'main'
make arti return a web page when receiving http request on socks port

See merge request tpo/core/arti!348
2022-02-24 20:48:28 +00:00
eta c6fdd7c003 arti-client: Unlock the state manager on failure to bootstrap
`StateMgr` got a new `unlock()` method that does what it says on the
tin. We now call it from `bootstrap()` using the new
`util::StateMgrUnlockGuard`, which works in a manner similar to the
`BoolResetter` from `tor_dirmgr`.

(A decent small little task in future might be to unify these types in
some sort of general arti utility crate?)

closes arti#335
2022-02-24 19:55:59 +00:00
eta d9df4d647d Merge branch 'http-layer' into 'main'
Initial cut of hyper bindings as a library crate

See merge request tpo/core/arti!342
2022-02-24 19:48:35 +00:00
Ian Jackson 78ab634ed9 Fix rustfmt 2022-02-24 19:45:58 +00:00
Nick Mathewson 7f3ea03e58 Merge branch 'proto_handshake_err' into 'main'
tor-proto: Split up a couple of handshake-based errors

Closes #359 and #358

See merge request tpo/core/arti!344
2022-02-24 19:44:34 +00:00
Ian Jackson f3520478b1 tor-proto datastream: Do not dump packet data in DataWriterImpl 2022-02-24 19:39:18 +00:00
Ian Jackson 097c852e58 tor-proto datastream: import std::fmt::Debug trait name 2022-02-24 19:39:18 +00:00
eta 3e4358c5d3 Merge branch 'remote_stream_err' into 'main'
Give specific error kinds to different END reasons

Closes #360

See merge request tpo/core/arti!343
2022-02-24 19:31:41 +00:00
trinity-1686a 65b71a190f use less magic in http check 2022-02-24 20:03:42 +01:00
eta b5cd85b401 Merge branch 'debug-datastream' into 'main'
impl Debug for DataStream (and its components)

See merge request tpo/core/arti!351
2022-02-24 18:36:19 +00:00
Nick Mathewson d8120e1649 proto: Refactor conversion from CodecError to Error
Remove default conversion; instead use a specific conversion in each
of the two modules that need to do it.
2022-02-24 13:23:42 -05:00
Ian Jackson b56115a04f impl Debug for DataStream (and its components)
My proximate motivation is that tls-api wants its inner streams to be
Debug.  But in general, I agree with the Rust API Guidelines notion
that almost everything should be Debug.

I have gone for the "dump all the things" approach.  A more nuanced
approach would be possible too.
2022-02-24 17:49:34 +00:00
Ian Jackson 5f83b2b7be Fix rustdoc "skip this" markup 2022-02-24 16:19:28 +00:00
Ian Jackson 9612a08b29 Note that tls-api is now async and can disable hostname verification
The other features we want aren't there yet.
2022-02-24 14:26:38 +00:00
Ian Jackson 2bbd01b060 tor-rtcompat: Provide TLS wrapping for all streams
Now all of the runtime types we provide all
  impl<S> TlsProvider<S> where S: ...
rather than merely TlsProvider<Self::TcpStream>.

And we document and intent to perhaps require this in the future.
2022-02-24 14:26:38 +00:00
Nick Mathewson 0600613110 Merge branch 'dir-store-redux' into 'main'
Dir store redux

See merge request tpo/core/arti!345
2022-02-24 13:58:54 +00:00
trinity-1686a e9b42938ec make arti return a web page when receiving http request on socks port 2022-02-23 23:03:42 +01:00
Nick Mathewson 47f554cd40 Merge branch 'typos' into 'main'
Fix typos

See merge request tpo/core/arti!346
2022-02-23 20:29:24 +00:00
Dimitris Apostolou a3c1ba4b1a
Fix typos 2022-02-23 21:07:05 +02:00
tharvik b28803d861 dirmgr::Store.expire_all takes config 2022-02-23 13:56:52 -05:00
tharvik 8658052ce3 dirmgr: add Store trait 2022-02-23 13:50:33 -05:00
eta 8603a90fb2 Merge branch 'custom-tcp-hook' into 'main'
add example of tcp hook

See merge request tpo/core/arti!341
2022-02-23 18:02:08 +00:00
trinity-1686a 078a91c591 add one more comment to hook-tcp 2022-02-23 18:00:35 +01:00
Nick Mathewson 74a5ce8635 tor-proto: refactor handshake protocol errors to a different type
This helps the user distinguish between protocol violations that
happen when connecting to the tor network from those that happen
while connected.

Closes #358.
2022-02-23 10:39:08 -05:00
Nick Mathewson d42b932ed9 tor-proto: Rename BadHandshake to BadCircHandshake
(We'll have a BadChanHandshake soon.)
2022-02-23 10:39:08 -05:00
Nick Mathewson afa49eac8f tor-proto: Split IoErr based on when it occurs
We want to distinguish handshake failures from errors later on in
the channel's lifetime.

Closes #359.
2022-02-23 10:38:48 -05:00
Ian Jackson fc35ffd6cd arti-hyper: impl HasKind for ConnectionError 2022-02-23 14:35:41 +00:00
Ian Jackson d7d0f52ef6 arti-hyper: Add note about missing https support 2022-02-23 14:35:41 +00:00
Ian Jackson 89146f37fb arti-hyper: Add vacuous doc comments to placate clippy 2022-02-23 14:35:41 +00:00
Ian Jackson 03de9f727c arti-hyper: Move support code into library
Pure code motion.  (Including motion/copying of "use" lines.)
2022-02-23 14:35:40 +00:00
Nick Mathewson 6c615898e4 Give specific error kinds to different END reasons
Closes #360.
2022-02-23 09:35:28 -05:00
Ian Jackson 80d8edc51f arti-hyper: Introduce new ConnectionError type
We need this not to use anyhow because we don't want our libraries to
expose anyhow, and this is about to go into the library.
2022-02-23 14:34:53 +00:00
Ian Jackson fe864c17c6 impl From<TorAddrError> for tor_error::Error
It auto-converts to ErrorDetail but add this for convenience of
callers which don't want to look into that unstable API.
2022-02-23 14:34:53 +00:00
Nick Mathewson 92141c6d72 Merge remote-tracking branch 'origin/mr/340' 2022-02-23 09:29:40 -05:00
Nick Mathewson 6ea0df166a Merge branch 'client_builder' into 'main'
Make a TorClientBuilder API.

Closes #350

See merge request tpo/core/arti!337
2022-02-23 14:14:32 +00:00
eta 9960064720 examples/hook-tcp: add some comments, rework lifetimes a bit
Try to make the `hook-tcp` example a bit easier to read by
adding/changing comments, and renaming the lifetimes for
`async_trait`-generated trait methods.
2022-02-23 13:59:03 +00:00
Ian Jackson 0cf9751d7f arti-hyper: Move hyper example from arti-client
Code motion and consequential dependency adjustments.
2022-02-23 13:55:17 +00:00
Ian Jackson 0f80be6b35 arti-hyper: empty crate skeleton 2022-02-23 13:55:14 +00:00
Ian Jackson f8d17bce83 Add missing documentation for TLS features to two readmes 2022-02-23 13:53:45 +00:00
trinity-1686a ce679ad72a implement correct handling of connection close and add comment explaining goal of the example 2022-02-23 13:29:37 +00:00
trinity-1686a b5707a98e7 add drop on CustomTcpStream to catch disconnection without close 2022-02-23 13:29:37 +00:00
trinity-1686a 81d7747d7b add example of tcp hook
this required to make additional types public
2022-02-23 13:29:37 +00:00
Ian Jackson fd288f90f9 Documentation suggestion from review. 2022-02-23 13:19:10 +00:00
Ian Jackson 05bf12edfa Cleanups on !340 from @diziet 2022-02-23 13:17:27 +00:00
eta 05257da72d Merge branch 'restore_needless_borrow_check' into 'main'
Remove clippy::needless_borrow exception in CI.

Closes #310

See merge request tpo/core/arti!338
2022-02-23 13:15:15 +00:00
Nick Mathewson 784f1531bb Make NoLock into BadApiUsage.
To implement this, we had to refactor the tor_circmgr api for
flushing state changes to disk, so that it checks if it has the lock,
and only then tries to store.
2022-02-22 16:13:37 -05:00