summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | rpc: Wire up arti-rpcserver to use tor-rpccmd.Nick Mathewson2023-04-122-24/+159
| | |
* | | rpc: temporary converion functions for some error types.Nick Mathewson2023-04-121-0/+22
| | |
* | | rpc: Make all object lookup fns return LookupError.Nick Mathewson2023-04-122-9/+3
| | |
* | | rpc: Try refactoring the context type to _be_ a Sink.Nick Mathewson2023-04-122-45/+53
| | | | | | | | | | | | | | | | | | This lets us avoid async_trait in tor-rpccmd, and makes us use a Box<>. I think we might actually get an even smarter type later on, but we will need to play with this for a while too.
* | | tor-rpccmd: Apply standard warnings and make them pass.Nick Mathewson2023-04-126-8/+80
| | |
* | | rpc: Make a real test for our dispatch logic.Nick Mathewson2023-04-121-20/+83
| | |
* | | rpc: Remove type mangling from rpc_invoke_fn!Nick Mathewson2023-04-121-15/+14
| | | | | | | | | | | | | | | | | | Now the user has to say that the fn takes an Arc<>, a Box<>, and an Arc<dyn>. Previously, they had to pretend that it didn't.
* | | rpc: Add an RpcError type.Nick Mathewson2023-04-124-9/+59
| | | | | | | | | | | | | | | | | | This could have been a trait instead, but I don't know whether that's smart or not. There is a lot of opportunity for refactoring here.
* | | rpc: Make invoke return a Result of erased_serde::SerializeNick Mathewson2023-04-123-10/+40
| | | | | | | | | | | | | | | This will let the actual RPC functions return any Result type that we can serialize.
* | | rpc: Add Update functionality to rpc::Context.Nick Mathewson2023-04-123-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | I'm not sure about these APIs at all! They force us to use `async_trait` for `tor_rpccmd::Context`, which bothers me. Should we just have a function that returns `Option<Box<dyn Sink<Item=X, Error=Y>>` or something? If so, what's the correct Y?
* | | rpc: do a better job of hiding impl_const_type_id!Nick Mathewson2023-04-124-5/+67
| | |
* | | RPC: Initial implementation of a multiple-argument dispatchNick Mathewson2023-04-127-8/+401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code uses some kludges (discussed with Ian previously and hopefully well documented here) to get a type-identifier for each type in a const context. It then defines a macro to declare a type-erased versions of a concrete implementation functions, and register those implementations to be called later. We will probably want to tweak a bunch of this code as we move ahead.
* | | Start on a lower-level tor-rpccmd crate.Nick Mathewson2023-04-127-35/+94
| | | | | | | | | | | | | | | This crate will hold the backend pieces of RPC interaction that different parts of Arti get to implement.
* | | rpc: Add a Session object and an interaction loop.Nick Mathewson2023-04-122-0/+184
| | |
* | | rpc: Add asynchronous_codec wrapper for jsonlines.Nick Mathewson2023-04-123-0/+102
| | |
* | | rpc: Add a cancellable future type.Nick Mathewson2023-04-123-0/+136
| | | | | | | | | | | | | | | | | | Ordinarily you can cancel a future just by dropping it, but we'll want the ability to cancel futures that we no longer own (because we gave them to a `FuturesUnordered`).
* | | rpc: Implement json message types for serde.Nick Mathewson2023-04-124-0/+253
| | |
* | | tor-proto: Be explicit about an into().Nick Mathewson2023-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | This is a workaround for an issue that I'm about to encounter somewhere in our pile of dependencies as I add arti-rpcserver, and somehow make serde_json visible in this test code thereby, making the PartialEq method resolution ambiguous.
* | | tor-hsclient: Add an allow to this incomplete codeIan Jackson2023-04-121-0/+1
| | | | | | | | | | | | Fixes CI warning.
* | | Apply ProtocolViolation renaming to hs connector codeIan Jackson2023-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | !1121 renamed *ProtocolFailed to *ProtocolViolation. !1118 introduced a new reference to a *ProtocolFailed I rebased !1118 onto main and enabled automerge. That tested the tip of !1118. I assume a similar thing happened to !1121. The possibility of such regressions is a property of our workflow. It's rather surprising it doesn't happen more often.
* | | Merge branch 'msrv-1.65' into 'main'Ian Jackson2023-04-1248-54/+54
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Increase Arti MSRV to 1.65 Closes #815 See merge request tpo/core/arti!1131
| * | | Use bool::then_some() as appropriateNick Mathewson2023-04-117-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | Now that we require a version of Rust that allows `b.then_some(v)`, clippy complains about our use of `b.then(|| v)`.
| * | | Increment MSRV to 1.65 in every crate.Nick Mathewson2023-04-1141-41/+41
| | | |
* | | | Merge branch 'bug804' into 'main'Nick Mathewson2023-04-114-13/+6
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | s/ProtocolFailed/ProtocolViolation/g where possible Closes #804 See merge request tpo/core/arti!1121
| * | | s/ProtocolFailed/ProtocolViolation/g where possibleNeel Chauhan2023-04-084-13/+6
| | |/ | |/|
* | | Merge branch 'hs' into 'main'Ian Jackson2023-04-116-38/+632
|\ \ \ | | | | | | | | | | | | | | | | Download HS descriptors See merge request tpo/core/arti!1118
| * | | hs connect: Improve a todo and refer to #813Ian Jackson2023-04-111-2/+1
| | | |
| * | | hs connect: Add TODOs re improving testsIan Jackson2023-04-111-0/+3
| | | | | | | | | | | | | | | | | | | | Aa per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1118#note_2894467
| * | | hs connect: Add TODO re multiple parallel hsdir requestsIan Jackson2023-04-111-0/+2
| | | |
| * | | hs connect: Improve docs for descriptor_ensureIan Jackson2023-04-111-1/+7
| | | |
| * | | hs connect: Clarify clientness of ContextIan Jackson2023-04-111-1/+1
| | | |
| * | | hs connect tests: check that we asked exactly one relayIan Jackson2023-04-111-6/+6
| | | |
| * | | hs connect tests: derive Default for MocksGlobal, and use itIan Jackson2023-04-111-2/+2
| | | |
| * | | hs connect: Test descriptor downloadIan Jackson2023-04-112-0/+123
| | | |
| * | | hs connect: Do circuitry etc. via mocks traitIan Jackson2023-04-111-7/+59
| | | | | | | | | | | | | | | | | | | | This doesn't change the text of the functional code, but now the methods are indirected via the Mock* traits.
| * | | hs dirs: Initial cut at descriptor downloadingIan Jackson2023-04-114-11/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many TODOs here. Some are questions; some are straightforward and can be done in followups. With this code, I am able to reach the eprintln! and todo! with curl --socks5-hostname localhost:9150 https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/
| * | | hs desc: Record a Timebound<HsDesc> (but not really for now)Ian Jackson2023-04-112-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a local alias of `HsDesc = String` which needs to be got rid of. But, right now the alternative would be to implement all the code for signature checking and decryption of an `HsDesc`, before we can make a test case for the downloader part.
| * | | hs connect: Introduce ContextIan Jackson2023-04-111-13/+91
| | | | | | | | | | | | | | | | | | | | This will be convenient as the common context for the descriptor download work, and also for testing.
| * | | hs dirs: Note a thing we don't implement yetIan Jackson2023-04-111-0/+11
| | | | | | | | | | | | | | | | We'll add this later, about here.
| * | | hs dirs: Implement spread_fetch (fmt)Ian Jackson2023-04-111-1/+4
| | | |
| * | | hs dirs: Implement spread_fetchIan Jackson2023-04-112-4/+10
| | | |
| * | | hs dirs: Fix wrong ignored variable nameIan Jackson2023-04-111-1/+1
| | | | | | | | | | | | | | | | This is the HsDirIndex, not the Hs[Blind]Id.
| * | | hs dirs: Replicas are 1-indexedIan Jackson2023-04-111-2/+2
| | | |
| * | | tor-netdir: Make an import more preciseIan Jackson2023-04-111-1/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this cargo +stable clippy --locked --offline -p tor-netdir --features=hs-client --all-targets I got this: 64 | use {hsdir_params::HsDirParams, hsdir_ring::HsDirRing, itertools::chain, std::iter}; | ^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
* | | tor-netdoc: Tidy up and fix some broken intra-doc linksIan Jackson2023-04-112-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Abbreviate the link text, and don't have it contain `crate` which is not really great in docs. 2. Use `super::` for the link target, to find the right thing. (`crate` doesn't seem to work in rustdoc, perhaps deliberately, although the error messages are ridiculous and claim the nonexistence of intermediate modules.) 3. Wrap the lines a bit more.
* | | tor-netdir: Fix capitalisation of a doc linkIan Jackson2023-04-111-1/+1
| | | | | | | | | | | | Fixes a rustdoc warning.
* | | tor-netdir: Fix link to hs_time_period functionIan Jackson2023-04-111-1/+1
| | | | | | | | | | | | Fixes a rustdoc warning.
* | | impl_debug_hex: Fix syntax error in usage templateIan Jackson2023-04-111-1/+1
|/ / | | | | | | Corrects the doc and fixes a rustdoc warning.
* | Merge branch 'correct_osx_config' into 'main'Ian Jackson2023-04-111-1/+1
|\ \ | | | | | | | | | | | | arti: Explain correct location of OSX config. See merge request tpo/core/arti!1125
| * | arti: Explain correct location of OSX config.Nick Mathewson2023-04-101-1/+1
| |/