| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Now that the proposal is implemented and merged into the specs,
the proposal itself is only historical.
Closes #1629.
|
| |\
| |
| |
| |
| | |
Copy section on objectid/isolation restrictions from prop351.
See merge request tpo/core/arti!2474
|
| | |
| |
| |
| |
| | |
Eventually it belongs in an RPC spec, but for now the relevant
discussion goes here.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
New tor-socksproto API
Closes #1627
See merge request tpo/core/arti!2436
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This restores the functionality of
socks users: detect closed sockets.
0c595818f713916d94b7b0e4062f953fad7c9799
which we reverted as part of rebasing this branch onto main.
|
| | | |
| | |
| | |
| | | |
This is neater, I think.
|
| | | |
| | |
| | |
| | | |
Fixes #1627 / TROVE-2024-010
|
| | | |
| | |
| | |
| | | |
No functional change.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This deduplicates some docs and eliminates the two wrapper functiosn
for `run_handshake`, which is now just `handshake`.
We're going to make other API breaks too, and this isn't going to be
the primary API, so we might as well do this.
Proper description of the semver breakage will come at the end when
it's all done.
|
| | | |
| | |
| | |
| | | |
This reverts commit 0c595818f713916d94b7b0e4062f953fad7c9799.
|
| | | |
| | |
| | |
| | | |
This reverts commit dceeb82f7d1154894ab9c7c607d68f8335bb9615.
|
| | |/
| |
| |
| |
| |
| | |
data"
This reverts commit 87e0109832559dec41a485b268579d58be0de278.
|
| |/ |
|
| |
|
|
|
|
|
|
| |
When calling copy_within, we want to copy the amount of data that
we're keeping; previously, we were copying an extra `action.drain`
bytes, which could have led to a panic.
Spotted by Opara.
|
| |
|
|
|
|
|
|
|
| |
Without this check, our socks code can enter an infinite loop
if a socket is closed at the wrong time.
Resolves TROVE-2024-011.
Fixes #1635.
|
| |\
| |
| |
| |
| | |
socks: Implement proposal 351.
See merge request tpo/core/arti!2401
|
| | | |
|
| | |
| |
| |
| | |
Introduce an enum, and use explicit `format_code @` syntax.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
(These streams would already be isolated by accident, since streams
with an RPC object are always on a client that's isolated from the
main client. But, as discussed on torspec!280, it's best to do this
sort of thing explicitly.)
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
The current best source here is prop351,
and later will be socks-extensions.md.
The examples are now correct.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
See https://spec.torproject.org/proposals/351-socks-auth-extensions.html
This proposal changes the interpretation of SOCKS5
usernames/passwords to give a more principled and extensible way of
getting RPC IDs and isolation strings.
|
| |\ \
| | |
| | |
| | |
| | | |
arti SOCKS proxy: Tear down connections when client sends optimistic data
See merge request tpo/core/arti!2443
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We *do* want to support optimistic data, see
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2436#note_3081886
However, right now, Arti risks mis-framing bugs if clients do send
optimistic data, which would be quite serious.
Mitigates #1627 / TROVE-2024-010 by replacing the misframing bug with
connection failure.
It doesn't seem so easy to write a test case for this.
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(And similarly rename TcpListener to NetStreamListener,
along with their TcpStream/TcpListener associated types.)
These types are about to become generic over addresses,
and therefore shouldn't be named after TCP.
Renaming was done mostly with Rust Analyzer,
except for some macros that needed to be hand-edited.
(I'll revise the comments in the next commit;
this one is all about renaming.)
|
| |/ |
|
| |
|
|
|
| |
Ticket #1509 will probably get rid of this constant,
but for now we may as well put it in one place.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This belongs in a spec, but adding things to a spec is slow and
fraught. Instead we'll put it here for now and move it later.
There are some XXXXs about "finalizing" the design that we need to
resolve before we can merge !2373 and implement stream creation in
`arti-rpc-client-core`.
|
| |
|
|
|
| |
(This is a bit trickier than I would like, but it ensures that we
never return a "not initialized yet" code.)
|
| |
|
|
|
|
|
| |
We'll need this for our rpc-library code to meaningfully open SOCKS
connections.
Closes #1523.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
On its own, this might not seem like a huge improvement, but it will
later let us implement these RPC methods for types that can't
reasonably implement ClientConnectionTarget.
It also serves as a proof of concept that special-method invocation
can actually work, so that we can build things like this in cases
where introducing a trait isn't practical.
Closes #1427
|
| |
|
|
| |
The context will make it possible to invoke rpc methods.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem was that Rust won't let us say
```
type ConnTarget<R> = Arc<dyn ClientConnectionTarget>;
```
because the R parameter wasn't used.
Previously we solved this by using a macro instead of a type
definition, which is ugly.
I had been thinking previously I would need to declare some kind of
additional wrapper type, and had shrunk from the verbosity. But
@diziet pointed out that I could just use a 2-tuple unconditionally.
It's still not beautiful, but it is less hideous than before.
|
| |
|
|
| |
(This is a separate commit to make the branch more readable)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(These will later become objects that can receive any application
request, once we have HTTP connect.)
For now, Session and TorClient implement this trait;
but soon there will be a new type to hold on to the created
DataStreamCtrl.
There are some XXXXs here, marking code that is too ugly to live.
I should fix it before I merge this branch.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I identified the cases to replace by searching for the string
`.report()`. There are a few that I didn't change:
* A couple of cases that used anyhow::Error,
* One case that reported two Errors.
* Two cases in `tor_hsclient::err` that just did
`error!("Bug: {}")`.
I have also not audited the cases in `tor-hsclient` where we're using
`tor_error::Report` manually.
Nonetheless, closes #949.
|
| |
|
|
|
|
|
|
| |
These have been subsumed by other errorkinds, mostly
OnionServiceProtocolViolation and TorProtocolViolation.
In particular please review the change in tor-hsclient closely;
I am not sure about the new errorkinds for the error there.
|
| |
|
|
|
|
|
|
|
| |
This takes an approach discussed in #736: Instead of trying to
distinguish INTRO/REND failures perfectly, we instead map our
existing ErrorKinds as best we can, in respect to the fact that
this distinction is not super important in practice.
Closes #736
|
| |
|
|
| |
Use this to emit HS_BAD_ADDRESS as appropriate.
|
| |
|
|
|
| |
These errors are orthogonal to our actual error kinds. See
discussion on #736.
|
| |
|
|
| |
Part of #736
|
| | |
|