| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This also fixes a couple of issues with the previous implementation:
* it enables you to watch for more than just one file/extension per
directory (each directory now has a list of filters. If any of the
filters apply to the path contained in the notify::Event, the
`FilterWatcher` notifies the listeners
* it removes the list watched files from `FileWatcher`. This makes
things a lot simpler to grok: essentially, the file watcher only
ever watches directories, notifying if an "interesting" file was
changed (in our case, the interesting files are files that have a
relevant extension, such as `.auth`, or specific configuration
files, as specified by `ConfigurationSources`).
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This will soon grow more complex, so I am preemptively moving it out of
`start_watching`.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We don't need this variant anymore, because sighup is now handled
separately from `FileWatcher` events.
|
| | | | | |
| | | | |
| | | | |
| | | | | |
The `FileWatcher` now uses a `postage::watch` channel under the hood.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The event handler will soon be made async, so we need a handle to the
runtime.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For the most part, this is just code motion.
The only change here is that `prepare` is no longer a method on
`FileWatcher`. This decouples `FileWatcher` from `ConfigurationSources`,
enabling us to use it to watch files and directories that aren't
configuration.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The `FileWatcher` doesn't contain the channel for receiving events
anymore, and `FileWatcher::event_matched` was removed at some point.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Circuit reactor: improve code comments
See merge request tpo/core/arti!2358
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
From
<https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2340#note_3062531>
|
| | | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | | |
In particular, clarify that stream-flow-control msgs don't get blocked
on circuit congestion control.
|
| |\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
tor-ptmgr: make managed PTs optional ('managed-pts' feature flag)
Closes #1334
See merge request tpo/core/arti!2354
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This conditionally compiles most of the code related to managed
transports.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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]>
|