Commit Graph

4166 Commits

Author SHA1 Message Date
Ian Jackson dc95c7874a tor-hscrypto: Break out REND_COOKIE_LEN
We need to reuse this.
2023-06-09 12:24:19 +01:00
Alexander Færøy 174332640d Merge branch 'hsclient-feature' into 'main'
hs: Fix a feature name in arti-client

See merge request tpo/core/arti!1222
2023-06-08 14:15:06 +00:00
Ian Jackson de995c1164 Expand docs for NetDirProvider
Apropos a question that arose on IRC, to which I felt the answer
wasn't 100% unambiguous.

Also, reference the usual implementation (it can't be a link because
it's an upward reference).
2023-06-08 10:47:29 +01:00
Nick Mathewson 924dbf7d8f Merge branch 'ipt_to_circtarget' into 'main'
Construct a CircTarget from an IntroPointDesc.

See merge request tpo/core/arti!1221
2023-06-07 12:35:26 +00:00
Nick Mathewson bdb96b4ac1 hs: Fix a feature name in arti-client
In arti-client it's called "onion-client", not "hs-client".
2023-06-07 08:21:22 -04:00
Nick Mathewson 618ed48cea hsclient: Create a CircTarget from an IntroPointDesc.
The main body of this function is written so that we can later use
it to create a CircTarget from an INTRODUCE2 message.
2023-06-07 07:55:45 -04:00
Alexander Færøy 2877140075 Merge branch 'access' into 'main'
hsdesc docs: Provide some accessors

See merge request tpo/core/arti!1220
2023-06-06 17:54:12 +00:00
Nick Mathewson 205b6d176c netdir, netdoc: Add accessors for protocol version status.
The consensus includes a listing for clients and for relays,
saying which protocol versions are _required_ for participation on
the network, and which versions are _recommended_.  We have been
parsing this, but not yet exposing it.

This commit adds accessors to expose it, since we'll need that in
order to create CircTargets for introduction points and rendezvous
points.
2023-06-06 09:06:01 -04:00
Nick Mathewson e7ebb31009 Merge branch 'remove_arrayref' into 'main'
Remove use of arrayref

Closes #872

See merge request tpo/core/arti!1214
2023-06-06 00:37:31 +00:00
Nick Mathewson 362a1f8ac1 arti: Interpret socks request to mean "lookup an RPC session"
The actual decoding here is just a placeholder.  The important part
is that we can get either a (SessionId, StreamId) tuple out of the
request, or we treat it as part of an isolation token.

This commit has a few TODOs for additional things that we'll need
in order to build out our design.
2023-06-05 14:47:38 -04:00
Nick Mathewson 291c739003 arti: Move SOCKS code for building StreamPrefs and getting a TorClient. 2023-06-05 14:46:51 -04:00
Nick Mathewson 05e9bc199b arti: Add an alias in the SOCKS code for per-conn isolatino info.
This enables some small simplifications.
2023-06-05 14:46:51 -04:00
Nick Mathewson e102a1c943 RPC: Note a possible API change in RpcMgr::new. 2023-06-05 14:46:51 -04:00
Nick Mathewson 3a93c94f4b RPC: Make Session objects get a GlobalId. 2023-06-05 14:46:51 -04:00
Nick Mathewson 9f51bcb0be RPC: tell the `arti` SOCKS code about an RpcMgr object.
It will use this to find which TorClient to use when opening a
stream.
2023-06-05 14:46:51 -04:00
Nick Mathewson 27a5074635 RPC: Give out and accept GlobalIds for appropriate objects. 2023-06-05 14:46:51 -04:00
Nick Mathewson b7feb034a9 RPC: Let objects declare that they need a GlobalId. 2023-06-05 14:46:51 -04:00
Nick Mathewson 71e98b1a12 RPC: Implement a "global identifier" for non-session-bound IDs
These identifiers are actually only "global" with respect to a given
`RpcMgr`, but they should not be forgeable or reusable across RpcMgr
objects.  We're going to use them so that we have a kind of identifier
for `TorClient`s that we can expose to SOCKS.
2023-06-05 14:46:51 -04:00
Nick Mathewson d6944bf003 rpc: Slightly refactor GenIdx encoding. 2023-06-05 14:45:42 -04:00
Nick Mathewson 545984b095 rpc: Give RpcMgr a registry of connections.
We're going to use this to implement arti#863, which requires that
some RPC objects be globally nameable.
2023-06-05 14:45:42 -04:00
Nick Mathewson 0b2511dd2b rpc: Move Arc::new() to RpcMgr code. 2023-06-05 14:45:42 -04:00
Ian Jackson 9a30d76ea6 hsdesc: Add minimal set of accessors for HsDesc and IntroPointDesc 2023-06-05 19:33:31 +01:00
Ian Jackson 8382927080 hsdesc docs: Don't imply that a thing has been done, which hasn't yet 2023-06-05 19:20:45 +01:00
Ian Jackson fa324f76de hsdesc docs: Use the definite article
These are (I hope) the only key matching the description.  If they're
not, the description needs to be expanded.
2023-06-05 19:20:13 +01:00
Ian Jackson 660726b2f0 tor-circmgr: send_control_message: Add reference to MR discussion 2023-06-05 13:54:49 +01:00
Ian Jackson bfe575bc64 tor-circmgr: send_control_message: Change a rename proposal
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1218#note_2908119
2023-06-05 13:51:01 +01:00
Ian Jackson 9b36697282 tor-circmgr: send_control_message: Fix reference to circuit 2023-06-05 13:50:51 +01:00
Ian Jackson e35d4e6a46 tor-circmgr: send_control_message: API change proposal
I am hoping we can merge this as a "TODO (Diziet)",  even though I
think it may be controversial.  Ie merging this doesn't represent a
decision to do as I suggest.
2023-06-05 13:19:58 +01:00
Ian Jackson eecbf85b4c tor-circmgr: Propose to rename `MetaCellDisposition::UninstallHandler` 2023-06-05 13:19:58 +01:00
Ian Jackson a9ff778ba5 tor-circmgr: send_control_message: Clarify some corner cases
Also, no longer talk about handlers being "installed".  That's not
something that's exposed by this API.

And, say that `send_control_message` can be called again only
after *`send_control_message`* returns, not when `handle_msg` has
returned `UinstallHandler`.  IMO this makes more sense.

Explain that we can't maintain a continuous watch while holding a
conversation with the peer.  (This is surely an API bug.)
2023-06-05 13:19:58 +01:00
Nick Mathewson 469f62a983 Remove semver.md files from 1.1.5 2023-06-01 14:08:24 -04:00
Ian Jackson 254d4c93a7 Merge branch 'bump-versions-v115' into 'main'
Bump crate versions in preparation for v1.1.5 release.

See merge request tpo/core/arti!1211
2023-06-01 17:32:41 +00:00
Nick Mathewson 0bf44b1393 tor-cell: remove use of arrayref
Closes #872
2023-06-01 11:14:48 -04:00
Nick Mathewson dfcbd7d4ee tor-llcrypto: remove use of arrayref 2023-06-01 10:50:25 -04:00
Nick Mathewson 744d32d554 tor-netdoc: remove use of arrayref. 2023-06-01 10:36:35 -04:00
Nick Mathewson 46d2a768a1 tor-proto: Remove use of arrayref. 2023-06-01 10:32:00 -04:00
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
Tor CI Release 3aef515135 fallbackdir: Update list generated on June 01, 2023
Signed-off-by: Tor CI Release <no-email@torproject.org>
2023-06-01 09:41:28 -04:00
Nick Mathewson 8d32e1f65f Run fixup-features script and resolve its complaints. 2023-05-31 08:04:10 -04:00
Nick Mathewson 244ec5dce2 tor-bytes: Remove use of arrayref
Part of #872: Now that const generics are in, we have better ways to
express converting slices into array-references.
2023-05-25 14:48:57 -04:00
Nick Mathewson 6703f3d52a Merge branch 'stream_ctrl' into 'main'
Experimental new stream-ctrl feature

Closes #847

See merge request tpo/core/arti!1198
2023-05-24 20:01:40 +00:00
Nick Mathewson e4758a754e Add "TODO RPC" notes around DataStreamCtrl per review. 2023-05-24 15:25:33 -04:00
Nick Mathewson a397ca77d9 proto: Add stream-status functionality to DataStreamCtrl.
There are some weaknesses and problems here; see TODO notes.
2023-05-24 15:25:33 -04:00
Ian Jackson 14b7fae113 Merge branch 'virtual_conditional' into 'main'
proto: Make PathEntry::Virtual feature-conditional.

See merge request tpo/core/arti!1201
2023-05-24 14:57:24 +00:00
Nick Mathewson 3d4b9aa1b7 Merge branch 'rpc-auth-and-meta' into 'main'
rpc: authentication and basic handle manipulation

See merge request tpo/core/arti!1200
2023-05-24 14:53:29 +00:00
Nick Mathewson 7178ab85eb Merge branch 'real_generational_arena' into 'main'
rpc: Use the real generational-arena crate

See merge request tpo/core/arti!1203
2023-05-24 14:50:20 +00:00
Nick Mathewson 936387efee rpc: Remove downgrade_owned for now
Rationale: Our weak-vs-strong design is a bit confused at the moment
due to concerns about deduplication and  capability semantics.  It's
not clear that a general "change strong to weak" method is
compatible with what we want to provide.
2023-05-24 10:15:56 -04:00
Nick Mathewson 4a9c6fba7d rpc: Disable auth:get_rpc_protocol for now. 2023-05-24 10:15:56 -04:00
Nick Mathewson 9713e8d305 rpc: Implement functionality to remove objects from a session
I've made doing some design choices here:
  * Reserving "rpc" as a prefix for post-authentication
    functionality that is not arti-specific.
  * Declaring these to be methods on the session rather than methods
    on the objects themselves.

There's a problem with defining an API to drop a weak reference; see
comment in code.
2023-05-24 10:15:56 -04:00
Nick Mathewson 15a8644bf7 rpc: fix documentation for methods in Context. 2023-05-24 10:15:56 -04:00