Nick Mathewson
daf5ecc153
Bump crate versions in preparation for v1.1.5 release.
...
Generated with the following commands:
```
cargo set-version --bump minor -p tor-cell
cargo set-version --bump minor -p tor-linkspec
cargo set-version --bump minor -p tor-proto
cargo set-version --bump minor -p tor-netdoc
cargo set-version --bump minor -p tor-circmgr
cargo set-version --bump patch -p tor-cert
cargo set-version --bump patch -p tor-basic-utils
cargo set-version --bump patch -p tor-rpcbase
cargo set-version --bump patch -p tor-llcrypto
cargo set-version --bump patch -p tor-hscrypto
cargo set-version --bump patch -p tor-checkable
cargo set-version --bump patch -p tor-async-utils
cargo set-version --bump patch -p caret
cargo set-version --bump patch -p fs-mistrust
cargo set-version --bump patch -p safelog
cargo set-version --bump patch -p retry-error
cargo set-version --bump patch -p tor-error
cargo set-version --bump patch -p tor-config
cargo set-version --bump patch -p tor-events
cargo set-version --bump patch -p tor-units
cargo set-version --bump patch -p tor-rtcompat
cargo set-version --bump patch -p tor-rtmock
cargo set-version --bump patch -p tor-protover
cargo set-version --bump patch -p tor-bytes
cargo set-version --bump patch -p tor-socksproto
cargo set-version --bump patch -p tor-consdiff
cargo set-version --bump patch -p tor-netdir
cargo set-version --bump patch -p tor-congestion
cargo set-version --bump patch -p tor-persist
cargo set-version --bump patch -p tor-chanmgr
cargo set-version --bump patch -p tor-ptmgr
cargo set-version --bump patch -p tor-guardmgr
cargo set-version --bump patch -p tor-dirclient
cargo set-version --bump patch -p tor-dirmgr
cargo set-version --bump patch -p tor-hsclient
cargo set-version --bump patch -p tor-hsservice
cargo set-version --bump patch -p arti-client
cargo set-version --bump patch -p arti-rpcserver
cargo set-version --bump patch -p arti-config
cargo set-version --bump patch -p arti-hyper
cargo set-version --bump patch -p arti
cargo set-version --bump patch -p arti-bench
cargo set-version --bump patch -p arti-testing
```
2023-06-01 10:03:05 -04:00
Nick Mathewson
65be721f46
Run "cargo update" in preparation for Thursday release.
2023-05-30 10:37:24 -04:00
Nick Mathewson
45b4845f3a
rpc: Remove fake_generational_arena
...
Now that generation-arena has merged [@diziet's patch] to clarify
their license, we no longer need to disable it.
[@diziet's patch]: https://github.com/fitzgen/generational-arena/pull/56
2023-05-23 13:58:08 -04:00
Nick Mathewson
9848155f59
Upgrade notify dependency to 6.0
2023-05-22 07:54:10 -04:00
Nick Mathewson
a179d10ad4
Upgrade async-compression dependency to 0.4.0.
2023-05-22 07:52:18 -04:00
Nick Mathewson
16c992ecd3
Upgrade memmap2 dependency to 0.6.1.
2023-05-22 07:51:22 -04:00
Nick Mathewson
512455da96
Upgrade serde_with dependency to 3.0.0
2023-05-22 07:49:58 -04:00
Nick Mathewson
cf06933d95
Run "cargo update".
2023-05-22 07:47:20 -04:00
Nick Mathewson
9d5dd813c0
hs_ntor: Use Subcredential type from tor-hscrypto
2023-05-17 16:18:55 -04:00
Nick Mathewson
2e1115acc3
rpc: Change the formatting of object IDs
...
We want each ID to have a unique form every time it is given out,
so that you can't use ID==ID to check whether Object==Object. (See
discussions leading to #848.)
We'd also like the form of object IDs to be a little annoying to
analyze, to discourage people from writing programs that depends on
their particular format. (We are reserving the right to change the
format whenever we want.)
We _don't_ want to use any cryptography here (yet), lest somebody
think that this is an actual security mechanism. (This isn't for
security; it's for encouraging developers to treat IDs as opaque.)
With that in mind, we now lightly obfuscate our generational indices
before returning them.
2023-05-15 15:59:58 -04:00
Nick Mathewson
bedc47afe7
llcrypto: upgrade x25519-dalek.
...
This upgrades us to 2.0.0-rc.2, which is the latest in the
not-quite-done-yet 2.0 series.
The only code change that's absolutely needed is opting into the
static_secrets feature.
2023-05-13 16:46:47 -04:00
Nick Mathewson
a86aff8399
linkspec: Make LinkSpecType public.
...
This lets us check the type of an `EncodedLinkSpec` as well, and
lets us remove an interface that took a raw u8.
2023-05-10 12:19:37 -04:00
Nick Mathewson
66aff12f19
bump to latest version of bumpalo to appease cargo_audit.
2023-05-09 15:08:58 -04:00
trinity-1686a
a8fd2d390e
update rustls to 0.21
2023-05-08 18:01:00 +02:00
trinity-1686a
7d50a34a3a
update rsa to 0.9.x
2023-05-08 17:24:23 +02:00
Gabriela Moldovan
6b9e37e07c
tor-netdir: Shuffle the list of HS dirs used for downloading descriptors.
...
We'll probably need the hsdir list to be shuffled deterministically for
testing purposes (this might be desirable, for example, when we write a
test for HS descriptor download retries).
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-04 17:53:58 +01:00
Nick Mathewson
7f59d7dae5
Temporarily replace generational-arena with a fake version.
...
This fake version is completely silly, but it will do the job until
we figure out our MPL2 concerns.
2023-05-04 10:37:27 -04:00
Nick Mathewson
475da9b802
Add a generational arena for object mapping for RPC.
...
See the comments on `TypedAddr` for some explanations about
why this is so tricky. Thanks to @diziet for helping me figure
this out.
2023-05-04 10:35:05 -04:00
Nick Mathewson
d7ab388faf
RPC: Start on plumbing TorClient into our RPC code
...
Because of #837 , we won't be able to work with _every_ TorClient<R>,
so I'm only going to be using TorClient<PreferredRuntime> for now.
2023-05-04 10:35:03 -04:00
Nick Mathewson
879a453212
RPC: Move the "listen" part of the RPC listener code to `arti`.
...
Now there's a module in `arti` that runs the loop for an RPC
listener. The part of the old `listener` module that made
the framed connections is now part of the `Session` object.
There is now yet another a temporary location for the pipe; we
should pick something better. At least now it's configurable.
2023-05-04 10:30:40 -04:00
Nick Mathewson
25398b5a3b
rpc: Make an RpcMgr type to own the DispatchTable.
...
In the future, this will probably hold more data as well, like a
TorClient and some configuration info.
The TorClient will present an issue; I've made comments about that.
Closes #820
2023-05-04 10:22:27 -04:00
Gabriela Moldovan
30983c764f
tor-netdir: Update tests to parse the descriptor, make test consensus lifetime configurable.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:25 +01:00
Nick Mathewson
e845a553f3
Upgrade tracing to 0.1.36.
...
This is the first version to impl Value for String.
With luck, this will get minimal_versions CI passing.
2023-05-03 11:09:21 -04:00
Nick Mathewson
1904cfc8b9
Increment crate versions.
...
Because of the errorkind bumps, we're calling this a breaking change
in everything lower-level than `arti`.
Generated with:
```
cargo set-version -p tor-basic-utils --bump minor
cargo set-version -p tor-async-utils --bump minor
cargo set-version -p caret --bump minor
cargo set-version -p fs-mistrust --bump minor
cargo set-version -p safelog --bump minor
cargo set-version -p retry-error --bump minor
cargo set-version -p tor-error --bump minor
cargo set-version -p tor-config --bump minor
cargo set-version -p tor-events --bump minor
cargo set-version -p tor-units --bump minor
cargo set-version -p tor-rtcompat --bump minor
cargo set-version -p tor-rtmock --bump minor
cargo set-version -p tor-rpcbase --bump minor
cargo set-version -p tor-llcrypto --bump minor
cargo set-version -p tor-protover --bump minor
cargo set-version -p tor-bytes --bump minor
cargo set-version -p tor-hscrypto --bump minor
cargo set-version -p tor-socksproto --bump minor
cargo set-version -p tor-checkable --bump minor
cargo set-version -p tor-cert --bump minor
cargo set-version -p tor-linkspec --bump minor
cargo set-version -p tor-cell --bump minor
cargo set-version -p tor-proto --bump minor
cargo set-version -p tor-netdoc --bump minor
cargo set-version -p tor-consdiff --bump minor
cargo set-version -p tor-netdir --bump minor
cargo set-version -p tor-congestion --bump minor
cargo set-version -p tor-persist --bump minor
cargo set-version -p tor-chanmgr --bump minor
cargo set-version -p tor-ptmgr --bump minor
cargo set-version -p tor-guardmgr --bump minor
cargo set-version -p tor-circmgr --bump minor
cargo set-version -p tor-dirclient --bump minor
cargo set-version -p tor-dirmgr --bump minor
cargo set-version -p tor-hsclient --bump minor
cargo set-version -p tor-hsservice --bump minor
cargo set-version -p arti-client --bump minor
cargo set-version -p arti-rpcserver --bump minor
cargo set-version -p arti-config --bump minor
cargo set-version -p arti-hyper --bump minor
cargo set-version -p arti --bump patch
cargo set-version -p arti-bench --bump patch
cargo set-version -p arti-testing --bump patch
```
2023-05-03 08:31:11 -04:00
Nick Mathewson
9ecc237c18
Run cargo update again. (Tracing 0.1.38 has been yanked)
2023-04-29 08:10:34 -06:00
Nick Mathewson
6d28469ba1
Run cargo update in preparation for release next week
2023-04-28 15:09:03 -06:00
Nick Mathewson
56b99075f6
Upgrade to serial_test 2.0.0
2023-04-28 10:35:54 -06:00
Nick Mathewson
f33aefd76c
rpcserver: Use with_fn.
2023-04-19 12:38:26 -04:00
Nick Mathewson
6f6a4d073e
rpcbase: Use with_fn.
2023-04-19 12:38:26 -04:00
Ian Jackson
6cdd7cc884
Run cargo update
...
The lockfile on main seems to be broken. I skim-eyeballed the diff,
which is entirely autogenerated.
2023-04-13 15:46:00 +01:00
gabi-250
31b6c9243d
Merge branch 'use_secmem_proc_03' into 'main'
...
Update our secmem_proc dependency to 0.3.0
Closes #664
See merge request tpo/core/arti!1138
2023-04-13 14:26:06 +00:00
gabi-250
da790e4b78
Merge branch 'misc_upgrades' into 'main'
...
Upgrade a couple more dependencies
See merge request tpo/core/arti!1139
2023-04-13 14:25:13 +00:00
Nick Mathewson
4efb423947
Upgrade our hex-literal dependency
2023-04-13 07:51:26 -04:00
Nick Mathewson
50d95964d1
Upgrade our num_enum dependency.
2023-04-13 07:50:11 -04:00
Nick Mathewson
6e83139fc7
Update our secmem_proc dependency to 0.3.0
...
(This wasn't possible before we updated our MSRV to 1.65.)
Closes #664 .
2023-04-13 07:41:46 -04:00
Nick Mathewson
739561b2cb
rpcbase: Use correct error codes, and add tests.
...
Well, mostly correct. Our current serde implementation doesn't
tell us much about what went wrong with the object, so we can't
tell why we couldn't convert it into a Request.
Also, our output for the data field is not as the spec says:
we should bring them into conformance.
Part of #825 .
2023-04-12 13:32:15 -04:00
Nick Mathewson
9a5f319a84
Rename tor-rpccmd to tor-rpcbase.
2023-04-12 07:34:57 -04:00
Nick Mathewson
0eb15ae592
rpc: Reify and expose DispatchTable.
2023-04-12 07:34:57 -04:00
Nick Mathewson
07bb57a4c2
rpc: Remove anyhow dependency
2023-04-12 07:34:57 -04:00
Nick Mathewson
06b2180907
rpc: Add a demonstration feature to "arti"
...
It's experimental, and tokio-only. To enable it, build with
the "rpc" feature turned on, and connect to
`~/.arti-rpc-TESTING/PIPE`. (`nc -U` worked for me)
I'll add some instructions.
2023-04-12 07:34:57 -04:00
Nick Mathewson
b024fe5596
rpc: Add an authentication step.
...
Per our design, every connection starts out unauthenticated, and
needs one authenticate command to become authenticated.
Right now the only authentication type is "This is a unix named
socket where everybody who can connect has permission."
2023-04-12 07:34:57 -04:00
Nick Mathewson
f9de7929c1
RPC: add a temporary "listen" function.
...
It requires tokio, it's unix-only, and makes some unfortunate
shortcuts. Probably good enough for initial testing.
2023-04-12 07:34:57 -04:00
Nick Mathewson
dce9c530ec
rpc: Add an RpcError type.
...
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.
2023-04-12 07:34:57 -04:00
Nick Mathewson
dec23c1cf6
rpc: Make invoke return a Result of erased_serde::Serialize
...
This will let the actual RPC functions return any Result type that
we can serialize.
2023-04-12 07:34:57 -04:00
Nick Mathewson
83b908aa3e
rpc: Add Update functionality to rpc::Context.
...
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?
2023-04-12 07:34:57 -04:00
Nick Mathewson
e26d9452dc
RPC: Initial implementation of a multiple-argument dispatch
...
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.
2023-04-12 07:34:57 -04:00
Nick Mathewson
a4660a4e09
Start on a lower-level tor-rpccmd crate.
...
This crate will hold the backend pieces of RPC interaction that
different parts of Arti get to implement.
2023-04-12 07:34:57 -04:00
Nick Mathewson
5247486cfc
rpc: Add asynchronous_codec wrapper for jsonlines.
2023-04-12 07:34:57 -04:00
Nick Mathewson
a662fb1296
rpc: Add a cancellable future type.
...
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`).
2023-04-12 07:34:57 -04:00
Nick Mathewson
0779d405cf
rpc: Implement json message types for serde.
2023-04-12 07:34:57 -04:00