| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This adds the trait type `ConnectOptions` to `NetStreamProvider` and adds
this `ConnectOptions` as an argument to `NetStreamProvider::connect()`.
You probably want to look at the changes in tor-rtcompat first, then the
rest of this commit is updating the various places we use
`NetStreamProvider`.
|
| | |
|
| |
|
|
|
|
|
|
| |
This change lets us avoid spawning extra tasks (due to one-direction
nature of copy_interactive), and avoid some lock contention (due to
use of AsyncReadExt::split).
Addresses part of #786.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The `stream` module is client-specific, for the most part, so I am
moving it under `client`. Later on, we will factor out the parts that
can be shared with the relay implementation.
Note: this is a breaking change as the deleted `stream` module was
`pub`. We could've kept the module and reexported from it the public
types from `tor_proto::client::stream`, but I think it's better to have
this `client` namespacing, because it makes the separation between the
client and relay parts clearer.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2918#note_3185872
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This proves the concept. Many more metrics will need to be added
throughout the codebase.
With this compiled in and enabled, I see this with curl:
> ```
> # TYPE arti_hss_proxy_connections_failed_total counter
> arti_hss_proxy_connections_failed_total{nickname="ztest",action="destroy_circuit"} 0
> arti_hss_proxy_connections_failed_total{nickname="ztest",action="ignore_stream"} 0
> arti_hss_proxy_connections_failed_total{nickname="ztest",action="forward"} 0
> arti_hss_proxy_connections_failed_total{nickname="ztest",action="reject_stream"} 0
>
> # TYPE arti_hss_proxy_connections_total counter
> arti_hss_proxy_connections_total{nickname="ztest",action="reject_stream"} 0
> arti_hss_proxy_connections_total{nickname="ztest",action="forward"} 1
> arti_hss_proxy_connections_total{nickname="ztest",action="destroy_circuit"} 0
> arti_hss_proxy_connections_total{nickname="ztest",action="ignore_stream"} 0
>
> # TYPE arti_hss_proxy_connections_ok_total counter
> arti_hss_proxy_connections_ok_total{nickname="ztest",action="destroy_circuit"} 0
> arti_hss_proxy_connections_ok_total{nickname="ztest",action="reject_stream"} 0
> arti_hss_proxy_connections_ok_total{nickname="ztest",action="ignore_stream"} 0
> arti_hss_proxy_connections_ok_total{nickname="ztest",action="forward"} 1
> ```
|
| |
|
|
|
| |
This means that we can use the same variable names for the clones,
which is considerably less confusing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having this in the `tor-async-utils` crate prevents us from doing both
of the following without introducing a circular dependency:
* using it in `tor-rtmock` (which we currently do, particularly in
tests).
* using `tor-rtmock` to test things in `tor-async-utils`. We don't do
this yet, but it is generally sensible to do so. In particular we
want to move the `stream_peak` module there, which is currently tested
with `tor-rtmock`.
Moving this into its own crate avoids this circular dependency.
|
| |
|
|
|
|
|
|
| |
I'm taking this out for now since we don't have support for actually
making these addresses work, and the current behavior will just
ignore connections silently.
Closes #1245
|
| | |
|
| | |
|
| |
|
|
|
| |
We separate these from our failures to connect to a local proxy,
since that is a much more common error.
|
| |
|
|
|
| |
See arti#1153 for followup work here. The current behavior is IMO
a decent default.
|
| |
|
|
| |
See torspec!237
|
| | |
|
| |
|
|
| |
We'll use this for logging.
|
| |
|
|
|
|
|
| |
Specifically, we check nothing except the port.
This matches the behavior of C-tor and the documentation in
torspec!179.
|
| |
|
|
|
| |
This is in keeping with the behavior of C tor, and of
torspec!179.
|
| |
|
|
| |
cargo fmt, precisely.
|
| | |
|
| | |
|
| |
|
|
| |
Our reconfigure methods take these by convention.
|
| | |
|
| | |
|
| |
|
|
|
| |
This commit fixes a warning in the documentation, caused by an
unresolved name.
|
| | |
|
| |
|
|
|
| |
With this patch we now propagate errors upwards rather than handling
them at the lowest possible level.
|
| |
|
|
|
| |
Now we finally have the code to copy the data back and forth on the
two AsyncRead+AsyncWrite objects that we create.
|
| | |
|
| |
|