| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Code that's related to managed transports has been moved to a new
'managed' module. This includes the PT reactor since it's not needed for
unmanaged transports.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is a little nicer and more type-safe to work with than
`TransportConfig`. It would have been nice to change `TransportConfig`
directly instead, but it would slightly change arti_client's public API,
and would require an extra field in the `[[bridges.transports]]` toml
table.
|
| |\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | | |
Add and use `PeekableStream` and `UnobtrusivePeekableStream`
See merge request tpo/core/arti!2345
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* Update `StreamPollSet` to require that its streams implement
`PeekableStream`, and to not do its own buffering of values read from
the stream.
This avoids an extra layer of buffering for streams that already
buffer a value, and makes the interior state a little simpler and more
robust.
It does have a downside of making the API a little less convenient,
since the caller must do its own `poll_peek` call if it wants a
reference to the item.
* Update `StreamMap` to implement `PeekableStream` for
`OpenStreamEntStream`, as it must to satisfy the updated
`StreamPollSet` API. We have to somewhat constrain the
`poll_ready_streams_iter` API to no longer return both a reference to
the stream and the message. I don't see a way to return both
while satisfying the borrow checker. Luckily we don't really need both
anymore.
* Update the Circuit reactor to handle the updated
`StreamMap::poll_ready_streams_iter` API.
|
| | | |/ /
| |/| | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
shadow: add obfs4 arti client + tor bridge
Closes #1538
See merge request tpo/core/arti!2355
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
llcrypto: Make `blind_keypair` build without hsv3-client.
Closes #1504
See merge request tpo/core/arti!2341
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Now it exists unconditionally so that we can have our assertion for
public key consistency happen unconditionally. (Blinding secret
keys is not remotely in the critical path, so I'm not concerned
about the critical path.)
From a suggestion from Gabi on !2341.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The `blind_keypair` function should only call `blind_pubkey` when it
is present.
Also, fix the documentation: blind_keypair is a hsv3-service function,
not a hsv3-client function.
Closes #1504.
|
| |\ \ \ \ \ \
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
rpclib: Allow ConnectionClosed in arti_socket_closed test
Closes #1510
See merge request tpo/core/arti!2348
|
| |/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This test is supposed to check the case where we launch a bunch
of requests but the socket is dropped before we get a response.
Different operating systems handle 'drop' a bit differently,
and schedule threads differently, so we shouldn't be surprised
at slightly different errors here.
In particular, OSX is more prone to deliver the close as a proper
"close" rather than an EPIPE or such, which previously broke
this test.
Closes #1510.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Make arrangements in tor-memquota for memory tracking to be optional
See merge request tpo/core/arti!2351
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Reported at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2351#note_3062292
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This will hopefully allow much caller code to be compiled out.
The users (IsParticipant impls) don't generally need to bother with
it - they can just ignore it.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Now if we run doctests without the feature enabled, we test that a
no-op MemoryQuotaTracker works.
Those tests aren't currently run in CI, but they will be after !2350.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Wrap up most of the structures in IfEnabled.
Sadly this diff is very noisy. I experimented with macros for the
little enabled check at the start of each function but they didn't
really help.
We don't test this yet. We'll do a smoke test of this later.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We're going to bind self_ to something more complicated, in each of
these functions, and that's what all these field references etc. will
need to refer to.
Do this mechanical change first for clarity.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
EnabledToken is pub because it's going to appear in public APIs.
|
| | | | | | | |
|
| | | |/ / /
| |/| | |
| | | | |
| | | | | |
This will make some later diffs easier to read.
|
| |\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | | |
rpcbase: Implement RPC method delegation support.
See merge request tpo/core/arti!2342
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
(Couldn't use Deref here, since we needed to get an Arc.)
Only one delegation target per object is permitted for now.
This will help with #1523.
|
| |\ \ \ \ \
| |_|_|/ /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
relay: Add basic configuration and builder
Closes #1534
See merge request tpo/core/arti!2352
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This adds the basic TorRelayConfig object along a builder in order to
create a TorRelay object.
At this commit, the configuration object only holds a "StorageConfig"
which is a simple starting point which will allow to expand to a KeyMgr
and then a ChanMgr along more configuration.
There is also no custom Error for the crate at this point.
Fixes #1534
Signed-off-by: David Goulet <[email protected]>
|
| |\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | | |
test: add logstate tests
See merge request tpo/core/arti!2349
|
| |/ / /
| | |
| | |
| | |
| | |
| | | |
This commit adds the display_recovery and
display_problem tests. Line coverage is increased from
0 to 96.97 percent.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
tor-circmgr: Remove unused "chosen exit" functionality
See merge request tpo/core/arti!2347
|
| | | | | |
|
| |/ / / |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
tor-proto: Encapsulate flow-control
See merge request tpo/core/arti!2340
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As clippy points out otherwise, this no longer actually loops.
Since the iterator already guarantees that the messages it produces
are ready to send with respect to flow control, and we've already
validated that we can send with respect to the circuit window,
the loop, we can always handle the first item from the iterator.
i.e. this changes a `while let` to an `if let`.
|
| | | | |
| | | |
| | | |
| | | | |
This is no longer needed. Removing it shouldn't change any behavior.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When we've exhausted circuit-level SENDME window, iterating over streams
is likely to be a waste of CPU. Theoretically we might be able to send
some messages that don't count towards windows, but on balance it
doesn't seem worth it.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This prevents us from having to iterate over streams blocked on flow
control inside the circuit reactor, and potentially allows further
simplification.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Encapsulate flow-control into a separate object that partially abstracts
away the difference between window-based (legacy) flow control and
xon-based (prop324) flow control.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since we no longer have an outbound queue for each hop, and instead
return an error here if there is insufficient circuit window to send a
message, there's no need to pre-check whether we have sufficient window.
If there's insufficient circuit window, we'll still return an error slightly
later, after failing to take from the circuit window.
|