aboutsummaryrefslogtreecommitdiff
path: root/crates/arti/src/proxy.rs
Commit message (Collapse)AuthorAgeFilesLines
* arti: Ratelimit proxy error reportssyphyr2026-07-231-3/+46
| | | | Implement log_ratelim! in report_proxy_error
* Remove now-unneeded allow(clippy::cognitive_complexity)Jim Newsome2026-07-151-1/+0
|
* Merge branch 'socket-buf-size' into 'main'opara2026-05-211-2/+3
|\ | | | | | | | | | | | | Set socket buffer sizes (`SO_SNDBUF` and `SO_RCVBUF`) for proxy sockets Closes #2500 See merge request tpo/core/arti!3957
| * arti: add 'proxy.socket_{send,recv}_buf_size' config optionsSteven Engler2026-05-071-20/+2
| |
| * arti: use 128 KB socket buffers for proxy socketsSteven Engler2026-05-071-2/+18
| |
| * tor-rtcompat+misc: add `NetStreamProvider::ListenOptions`Steven Engler2026-05-071-1/+4
| | | | | | | | | | | | | | | | | | This adds the trait type `ListenOptions` to `NetStreamProvider` and adds this `ListenOptions` as an argument to `NetStreamProvider::listen()`. 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`.
* | Merge branch 'arc_torclient' into 'main'Nick Mathewson2026-05-131-4/+4
|\ \ | | | | | | | | | | | | | | | | | | Make all TorClient constructors wrap the TorClient in an Arc. Closes #2469 See merge request tpo/core/arti!3990
| * | Make all TorClient constructors wrap the TorClient in an Arc.Nick Mathewson2026-05-131-4/+4
| |/ | | | | | | | | | | This is part of rationalizing the structure of TorClient so we can refactor startup logic, and so that RPC code can reason about object identity. See #2469.
* / Turn an expectation into an allowIan Jackson2026-05-131-1/+1
|/ | | | Fixes `cargo clippy --locked --all-features -p arti`
* arti: fix clippy warnings in `report_proxy_error()`Steven Engler2026-03-301-3/+5
|
* arti: use report macros in `report_proxy_error()`Steven Engler2026-03-301-5/+6
|
* arti: don't warn for `NotConnected` errorsSteven Engler2026-03-301-0/+1
|
* arti: Add an option to disable http_connect.Nick Mathewson2026-03-251-18/+52
| | | | | | | | | This option affects all socks listeners, because: - We don't have a convenient way to associate an option with each port. - The main purpose of having this option is as a switch in case we discover a major problem with this code.
* arti: Fix up proxy launching documentationNick Mathewson2026-02-191-1/+2
|
* arti: Extract responsibility for port listing.Nick Mathewson2026-02-191-50/+29
| | | | | Instead of doing this when we construct the listeners, we can do it in a separate method, to simplify the return type.
* arti: Refactor socks proxy launcher function.Nick Mathewson2026-02-191-13/+34
| | | | Part of #2301.
* arti: Use ErrorSources in extract_proto_errRobert Bartlensky2026-02-141-12/+5
|
* Don't log Circuit Closed errors as warningsrobertb2026-02-051-1/+6
|
* arti: Downgrade CircuitClosed to debug level.Nick Mathewson2026-01-221-3/+20
| | | | | | | This isn't the long-term solution to error reporting and proxies, but it is a start that we can work from. Closes #2304.
* arti: Extract function to find a ProtoError sourceNick Mathewson2026-01-221-0/+17
|
* Make sure that rpc_state_sender lives as long as the proxies.Nick Mathewson2026-01-121-2/+8
| | | | | | Fixes bug introduced in 0cc367b9fef37c0f7d7f04d54c4687b27ef251d0. Without this fix, RPC's get_proxy_info command wouldn't work.
* arti: Export the chosen ports in a ports_info.json file.Nick Mathewson2025-12-161-7/+26
| | | | | This allows applications to find out where arti is listening when arti has been configured to listen with the port "auto".
* arti: Change how proxy futures are returned.Nick Mathewson2025-12-161-4/+6
| | | | | | | | | | | | | | Previously, the proxy and dns modules only had "be a proxy" functions that ran forever. Now they have functions that bind to listeners and return a separate "be a proxy" future that runs forever. This lets us simplify some kludges in subcommands::proxy. More importantly, it will let us return the bound-to ports so that subcommands::proxy can write them to disk. This is a break in experimental-apis, which does not require a semver change.
* arti: tweak docs, add TODOs with respect to Listener.Nick Mathewson2025-12-161-1/+2
|
* arti: Log the actual addresses we are listening on.Nick Mathewson2025-12-161-2/+4
|
* tor-config: rename `Listen::is_localhost_only` to `is_loopback_only`Steven Engler2025-12-021-1/+1
| | | | Assumes that 0.37.0 will be the next version number.
* Fix compilation without all-features.Nick Mathewson2025-11-121-1/+2
|
* Add a notion of isolation strong enough to enable long-lived circuits.Nick Mathewson2025-11-121-0/+12
| | | | Part of prop368.
* all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-041-1/+1
|
* Replace copy_interactive with futures-copy.Nick Mathewson2025-10-301-70/+5
| | | | | | | | 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.
* Merge branch 'remove_socks' into 'main'Nick Mathewson2025-10-281-4/+17
|\ | | | | | | | | | | | | arti: Revise strings that implied that we were a SOCKS-only proxy. Closes #2225 See merge request tpo/core/arti!3398
| * arti: explain APP_STREAM_BUF_LEN is what it is.Nick Mathewson2025-10-281-0/+6
| |
| * arti: Revise strings that implied that we were a SOCKS-only proxy.Nick Mathewson2025-10-281-1/+1
| | | | | | | | Closes #2225
| * arti: Stop using SOCKS_BUF_LEN for non-SOCKS proxies.Nick Mathewson2025-10-281-3/+10
| |
* | arti: Remove now-needless cognitive_complexity exceptionsNick Mathewson2025-10-281-1/+0
|/ | | | | | | Apparently the http_connect refactoring made these no longer trigger. Closes #2226
* http_connect: Remove (most) X- prefixes.Nick Mathewson2025-10-281-11/+6
| | | | | | We can't remove them all, since X-Tor-Stream-Isolation is recognized by C-Tor. I've added a non-deprecated Tor-Stream-Isolation that works indepenently.
* proxy: Revise rpc docs so they are not SOCKS-specificNick Mathewson2025-10-281-14/+20
|
* http_connect: Implement stream isolationNick Mathewson2025-10-281-0/+8
|
* arti: Implement a "bilingual" HTTP CONNECT proxy.Nick Mathewson2025-10-281-1/+1
| | | | | | | | | | | With his commit, our SOCKS ports now accept both SOCKS and HTTP CONNECT requests, per proposal 365. There are still some infelicities, marked with "XXXX" or "TODO". I've tested this with curl, though, and it works. :) Typo-fixes-by: Gabriela Moldovan <[email protected]>
* arti: Detect proxy protocol _before_ starting SOCKS.Nick Mathewson2025-10-281-3/+72
| | | | | This will let us speak HTTP CONNECT as well; there is a stub for initiating an http proxy.
* arti: Pass a buffered stream to handle_socks_connNick Mathewson2025-10-281-1/+4
| | | | This will let us implement bilingual HTTP proxies.
* arti: Renaming around socks/generic proxiesNick Mathewson2025-10-281-29/+32
| | | | This is _all_ renaming and comment adjustments.
* arti: Split socks-specific parts out of handle_socks_connNick Mathewson2025-10-281-448/+12
| | | | | | | | | We want to abstract every part of this code that knows that it's speaking SOCKS, so that we can in turn add a new proxy type. Note that several methods and types here have names that are no longer appropriate for their functionality. I'll revise those in a later commit.
* arti::proxy: Small reformats.Nick Mathewson2025-10-281-5/+7
| | | | | (I'm not sure why this wasn't already done, but let's do it as a separate MR.)
* Rename "arti::socks" to "arti::proxy".Nick Mathewson2025-10-281-0/+917
| | | | I'm about to add another proxy type.
* add udp to runtimetrinity-1686a2022-03-141-537/+0
|
* arti: Make main module entrypoints pubIan Jackson2022-03-111-2/+2
| | | | | This does not constitute any kind of stable API promise. But it might allow people to use our arti client code in novel ways.
* use less magic in http checktrinity-1686a2022-02-241-2/+4
|
* make arti return a web page when receiving http request on socks porttrinity-1686a2022-02-231-1/+34
|
* Rename ExitTimeout to RemoteNetworkTimeout.Nick Mathewson2022-02-171-1/+1
|