aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | arti-hyper: Provide TLS connector and make space for TLS streamIan Jackson2022-02-284-26/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tls_conn field to ArtiHttpConnector (and argument to constructor). Introduce MaybeHttpsStream and use it in ArtiHttpConnection. Have the example program pass the native TLS connector. Currently the TLS connector and the HTTPS variant are not used, but this commit is very noisy and fomrulaic, so I have split out the code to use them into a separate commit for easier preparation and review.
| * | | | Manually implement Clone for ArtiHttpConnectorIan Jackson2022-02-281-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | This will be needed in a moment and doing it now makes the next patch smaller and hence easier to read.
| * | | | Introduce ErrorKind::OtherRemoteIan Jackson2022-02-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti-hyper wants to be able to have a kind for TLS failure. Given that arti-hyper is above arti-client, this shows that callers above arti-client might need to invent kinds for their own errors. Possibly this means we need other Other errors for other locations. If we have pluggable components we might even want OtherTorError.
| * | | | arti-hyper: Disable clippy::clone_on_ref_ptrIan Jackson2022-02-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/355#note_2781816 disable this here for now, pending a decision on !352
* | | | | Merge branch 'retry-err-circmgr' into 'main'Nick Mathewson2022-02-281-45/+50
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | add some error to retry_error instead of dropping it See merge request tpo/core/arti!368
| * | | | resolve commenttrinity-1686a2022-02-281-1/+6
| | | | |
| * | | | add some error to retry_error instead of dropping ittrinity-1686a2022-02-281-45/+45
| | | | |
* | | | | Merge branch 'fix/368' into 'main'Nick Mathewson2022-02-281-1/+0
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | remove usage of dbg!(..) Closes #368 See merge request tpo/core/arti!367
| * | | | remove usage of dbg!(..)trinity-1686a2022-02-281-1/+0
| | | | | | | | | | | | | | | | | | | | it's making rust-nightly job fail
* | | | | Start our 0.1.0 changelog.Nick Mathewson2022-02-281-0/+134
|/ / / /
| | * | Merge branch 'main'Ian Jackson2022-03-0115-198/+291
| | |\ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | Fixed conflict in crates/arti-client/src/lib.rs as per tree from https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/364/#note_2782166 ie 13e55b8d7c22c26e55ba75823409b477f1bce66b
* | | | Merge branch 'teardown' into 'main'Nick Mathewson2022-02-281-1/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-circmgr: take_action: Handle Cancelled from the oneshot Closes #365 See merge request tpo/core/arti!363
| * | | | Add a debug! log message for source cancellationIan Jackson2022-02-281-0/+4
| | | | |
| * | | | Fix rustfmtIan Jackson2022-02-281-1/+1
| | | | |
| * | | | tor-circmgr: take_action: Handle Cancelled from the oneshotIan Jackson2022-02-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #365 Inspection of the code and logs shows that: * One of the plan futures' oneshots must be returning Cancelled * This means that the corresponding sender must have been dropped * The sender is owned by the task spawned by spawn_launch Presumably that entire task gets dropped as part of executor shutdown, or something. The correct response in this situation is to declare that we are shutting down, and stop trying to do stuff. Unfortunately, despite trying quite hard by putting sleeps in various strategic places, I have not been able to reproduce the problem. So I can't be 100% sure that the new behaviour is correct. But I am reasonably confident that this ought not to be able to occur unless either 1. the task from spawn_launch is dropped, or 2. that task somehow panics despite its attempts to trap panics and report them as errors through the oneshot. So this "burn it all down" action ought only to occur in actually serious situations. I observe that 3ff9b187ea26aaec4875067fcdbf485ecc9f597d Handle panics from circuit construction. changed the EK for PendingCanceled to EK::ReactorShuttingDown, and there's From impl. I think, therefore, that it is right to reuse this Error variant. I don't quite understand why when take_action gets an actual error it doesn't push it, but just logs it. But I am not changing that for now. Arguably the two instances of retry_error.push are a sign of an inferior flow control pattern - maybe the loop body including the code I am adding ought to be an IEFE returning `Result<Option<circ>, crate::Error>`.
* | | | | Merge branch 'faster-ci' into 'main'eta2022-02-281-6/+7
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | attempt at making CI faster See merge request tpo/core/arti!361
| * | | | | attempt at making CI fastertrinity-1686a2022-02-251-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Update to new arti-corporaNick Mathewson2022-02-281-0/+0
| | | | | |
* | | | | | Merge branch 'split-static' into 'main'eta2022-02-284-7/+41
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split "static" into sqlite and native-tls features. Closes #302 See merge request tpo/core/arti!362
| * | | | | | Split "static" into sqlite and native-tls features.Nick Mathewson2022-02-254-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, it's impossible to get a static sqlite linkage without also getting native-tls, even if you wanted rustls. Closes #302.
* | | | | | | Merge branch 'always-coarsetime' into 'main'eta2022-02-284-13/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make coarsetime dependency and traffic-timestamping non-optional. See merge request tpo/core/arti!358
| * | | | | | | Make coarsetime dependency and traffic-timestamping non-optional.Nick Mathewson2022-02-254-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously coarsetime and the traffic-timestamp feature were enabled, since they were only required for a small corner of the guardmgr algorithm. But in 1.0 and beyond we'll be adding a bunch of other features (eg, netflow padding, DoS prevention) that will need coarsetime all over the place. And since we're going to be doing coarsetime all over the place, the previous justification for making traffic-timestamping optional (the tiny performance hit) is no longer relevant.
* | | | | | | | Merge branch 'fix/210' into 'main'Nick Mathewson2022-02-281-1/+1
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't return already errored pending circuit when searching new circuit matching spec Closes #210 See merge request tpo/core/arti!366
| * | | | | | | don't return already errored pending circuit when searching new circuit ↵trinity-1686a2022-02-271-1/+1
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | matching spec
* | | | | | | Merge branch 'more-debug' into 'main'Ian Jackson2022-02-284-4/+36
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | impl Debug for various internal types See merge request tpo/core/arti!360
| * | | | | | Fix two typosNick Mathewson2022-02-282-2/+2
| | | | | | |
| * | | | | | impl Debug for various internal typesIan Jackson2022-02-254-4/+36
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wanted this while debugging something. The ad-hoc impl Debug with f.debug_struct is getting repetitive and I've already perpetrated one copy-paste mistake. We should consider using something like the `educe` crate's Clone.
* | | | | | Merge branch 'cargo_upgrade' into 'main'Nick Mathewson2022-02-251-168/+204
|\ \ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | Run "cargo upgrade" in preparation for 0.1.0. See merge request tpo/core/arti!359
| * | | | | Run "cargo upgrade" in preparation for 0.1.0.Nick Mathewson2022-02-251-168/+204
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | (It's good to do this a couple of days in advance in case it turns up any bugs. That's how we caught the panic bug in simple_asn1 0.6.0)
| | | * | arti-client: use PreferredRuntime by default, doc cleanupseta2022-02-289-139/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes using the `PreferredRuntime` the first-class option inside `arti-client`, freeing users who don't want to think about runtimes from having to do so. `TorClient::create_unbootstrapped` and `builder` now automatically use this runtime, leaving only `builder_custom` for users who wish to manually specify a runtime. This lets us clean up the docs a lot: mentions of using custom runtimes are now relegated to nearer the end of the crate-level documentation, and we mostly just link to `tor_rtcompat`'s docs to explain more there. Instead, we take some more time to explain how you use the builder API to create clients synchronously. Other doc cleanups included getting rid of the explanation of `TorAddr` in the main crate-level doc; this is already well-documented elsewhere, and is something users should discover organically later. fixes arti#326
| | | * | tor-rtcompat: refactor PreferredRuntime, clean up docseta2022-02-253-55/+142
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `PreferredRuntime` is now an opaque wrapper struct that contains the "actual" preferred runtime as a type alias. The `current_user_runtime` and `create_runtime` functions become `PreferredRuntime::current` and `PreferredRuntime::create`, respectively. This removes the dependence on `impl Trait`, meaning we can now name the returned runtime (yay!). In addition, the documentation was cleaned up a bit to make it (hopefully) flow better. Items that don't make sense to publicize, like testing implementation details, have been marked #[doc(hidden)] and semver warnings added.
* | | | Merge branch 'upgrade-dependencies' into 'main'Nick Mathewson2022-02-2517-75/+97
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Upgrade a few dependencies to newer versions See merge request tpo/core/arti!357
| * | | Update minimum backtrace version to 0.3.39Nick Mathewson2022-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | This is needed to make the backtrace test pass on Rust 1.53 with minimum-version libraries.
| * | | Bump minimum tokio to 1.7, since tokio-util now needs that.Nick Mathewson2022-02-257-7/+7
| | | |
| * | | Remove lexical-core from downgrade_dependencies exceptions.Nick Mathewson2022-02-251-1/+0
| | | |
| * | | Upgrade to newer version of config crate.Nick Mathewson2022-02-258-59/+82
| | | |
| * | | Upgrade dependency to new version of tokio-util.Nick Mathewson2022-02-253-3/+3
| | | |
| * | | Upgrade dependency to new version of rlimit.Nick Mathewson2022-02-253-4/+4
| | | |
* | | | Merge branch 'tcp-hook-new-tls' into 'main'eta2022-02-251-2/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | use runtime TlsProvider in tcp-hook example See merge request tpo/core/arti!356
| * | | | use runtime TlsProvider in tcp-hook exampletrinity-1686a2022-02-251-2/+1
| | |/ / | |/| |
* | | | Merge branch 'debug-datastream' into 'main'eta2022-02-251-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-proto datastream: Fix typo in Debug impl See merge request tpo/core/arti!354
| * | | | tor-proto datastream: Fix typo in Debug implIan Jackson2022-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/353#note_2781632
* | | | | Merge branch 'fuzz' into 'main'eta2022-02-254-23/+63
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | add script for coverage of fuzzing Closes #137 See merge request tpo/core/arti!339
| * | | | better config for fuzztrinity-1686a2022-02-232-4/+10
| | | | |
| * | | | add script for coverage on fuzzingtrinity-1686a2022-02-224-3/+50
| | | | |
| * | | | use libfuzz capabilities instead of scriptingtrinity-1686a2022-02-222-23/+10
| | | | |
* | | | | Merge branch 'get-runtime' into 'main'Ian Jackson2022-02-251-0/+11
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | TorClient: Add get_runtime() convenience method See merge request tpo/core/arti!350
| * | | | TorClient:runtime(): rename from get_runtimeIan Jackson2022-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/350#note_2781368
| * | | | TorClient: Add get_runtime() convenience methodIan Jackson2022-02-241-0/+11
| |/ / /
* | | | Merge branch 'tls-trait' into 'main'Ian Jackson2022-02-258-31/+39
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | tor-rtcompat: Provide TLS wrapping for all streams See merge request tpo/core/arti!349