aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsrproxy/src/proxy.rs
Commit message (Collapse)AuthorAgeFilesLines
* added Unix Socket supportpryty262026-07-011-7/+21
|
* proto: Add crate-level exports for two extra stream types (fmt)Gabriela Moldovan2026-06-171-1/+2
|
* tor-rtcompat+misc: add `NetStreamProvider::ConnectOptions`Steven Engler2026-06-081-1/+6
| | | | | | | | | 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`.
* all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-041-2/+1
|
* Replace copy_interactive with futures-copy.Nick Mathewson2025-10-301-72/+25
| | | | | | | | 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.
* proto: Move the `stream` module under `client` (breaking).Gabriela Moldovan2025-08-181-1/+1
| | | | | | | | | | | | 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.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-3/+3
| | | | | | | | | | | | | | 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.
* metrics: tor-hsrproxy: Use a bespoke type for counter outcomesIan Jackson2025-04-081-5/+19
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2918#note_3185872
* tor-hsrproxy: Export a connection count metric (fmt)Ian Jackson2025-04-081-1/+3
|
* tor-hsrproxy: Export a connection count metricIan Jackson2025-04-081-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 > ```
* tor-hsrproxy: Move cloning into spawnIan Jackson2025-04-081-12/+12
| | | | | This means that we can use the same variable names for the clones, which is considerably less confusing.
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-281-1/+1
| | | | | | | | | | | | | | 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.
* hsrproxy: Temporarily remove ability to config unix addressesNick Mathewson2024-01-161-4/+5
| | | | | | | | 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
* hsrproxy: downgrade remaining TODO HSS comments.Nick Mathewson2024-01-091-2/+2
|
* Apply 1 suggestion(s) to 1 file(s)Ian Jackson2023-12-111-0/+2
|
* hsrproxy: Log rate-limited failures of other types as wellNick Mathewson2023-12-071-22/+18
| | | | | We separate these from our failures to connect to a local proxy, since that is a much more common error.
* hsproxy: remove TODO about retroactive limitsNick Mathewson2023-12-071-1/+1
| | | | | See arti#1153 for followup work here. The current behavior is IMO a decent default.
* hsrproxy: Remove TODO about empty Connected messagesNick Mathewson2023-12-071-1/+0
| | | | See torspec!237
* hsproxy: Add a rate-limited log for forwarding errors.Nick Mathewson2023-12-071-5/+9
|
* hsrproxy: Take nickname as an argument and pass it to forwarding functionNick Mathewson2023-12-071-4/+15
| | | | We'll use this for logging.
* hsrproxy: Document what we check about begin messagesNick Mathewson2023-10-231-1/+2
| | | | | | | Specifically, we check nothing except the port. This matches the behavior of C-tor and the documentation in torspec!179.
* hsrproxy: Send back DONE reasons.Nick Mathewson2023-10-231-3/+3
| | | | | This is in keeping with the behavior of C tor, and of torspec!179.
* oneshot: Apply deferred rustfmt churnIan Jackson2023-10-111-3/+3
| | | | cargo fmt, precisely.
* oneshot: Use veneer in tor-hsrproxyIan Jackson2023-10-111-1/+2
|
* Note reconfigure limitations.Nick Mathewson2023-10-051-0/+4
|
* hsrproxy: Add "how" to reconfigure.Nick Mathewson2023-10-051-1/+9
| | | | Our reconfigure methods take these by convention.
* hsrproxy: fix a rustdoc link.Nick Mathewson2023-10-031-1/+1
|
* hsproxy: fix a documentation link.Nick Mathewson2023-10-031-1/+1
|
* tor-hsrproxy: Fix relative documentation warningEmil Engler2023-09-301-2/+2
| | | | | This commit fixes a warning in the documentation, caused by an unresolved name.
* hsrproxy: detect shutdown correctly.Nick Mathewson2023-09-271-6/+23
|
* hsrproxy: improve error handling somewhatNick Mathewson2023-09-271-34/+112
| | | | | With this patch we now propagate errors upwards rather than handling them at the lowest possible level.
* rproxy: Implement the actual "proxy" part of the code.Nick Mathewson2023-09-271-10/+78
| | | | | Now we finally have the code to copy the data back and forth on the two AsyncRead+AsyncWrite objects that we create.
* hsrproxy: Implement more of the proxy functionalityNick Mathewson2023-09-271-4/+133
|
* hsrproxy: Start to sketch out an rproxy implementation.Nick Mathewson2023-09-271-0/+60