summaryrefslogtreecommitdiff
path: root/crates/arti/src/proxy.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Try to resolve the "Truncated" error in tor-socksprotoNick Mathewson2022-02-111-3/+3
| | | | | I'm not in love with this solution; the others just seem a bit ugly too.
* Make the Error detail type non-exported from arti-clientNick Mathewson2022-02-041-3/+3
| | | | | | | | | | | At least by default, we should have Error be private, and not expose it as part of our APIs. To keep functionality in `arti`, I had to add an `ExitTimeout` error kind. For interface consistency, I also re-exported ErrorKind and HasError from `arti_client`.
* Remove many needless borrows and slicesIan Jackson2022-02-021-2/+2
| | | | | | | Found via clippy::needless_borrow. In some cases I removed needless `[..]` too. See also: needless_borrow suggestion doesn't go far enough https://github.com/rust-lang/rust-clippy/issues/8389
* Un-Arc<> TorClient in the arti crateNick Mathewson2022-02-011-3/+3
| | | | | TorClient doesn't need to be wrapped in an Arc any longer, thanks to other refactoring.
* StreamPrefs: Re-alphabetise imports following renameIan Jackson2022-01-211-1/+1
| | | | Placates rustfmt
* StreamPrefs: rename from ConnectPrefsIan Jackson2022-01-211-3/+3
| | | | | | | | | | | | | The docs even say this is about stream. As @nickm writes in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771289 we generally call end-to-end connections that are tunneled over Tor "Streams" to distinguish them from everything else in the Tor protocols that could possibly be called a "Connection". That seems to apply here too.
* connection preferences: Take ConnectPrefs by referenceIan Jackson2022-01-191-3/+3
| | | | | This may save quite a bit of copying. The callees don't need to copy the whole struct; they copy the bits they need.
* Use *_with_prefs() for Option<ConnectPrefs> callers in TorClient::connectNeel Chauhan2022-01-081-3/+5
|
* proxy: introduce new functions to write_all & flush/closeMuhammad Falak R Wani2021-12-151-42/+42
| | | | Signed-off-by: Muhammad Falak R Wani <[email protected]>
* proxy: send SOCKS5 reply on failure casesMuhammad Falak R Wani2021-12-111-1/+14
| | | | Signed-off-by: Muhammad Falak R Wani <[email protected]>
* proxy: report an error if all listeners fail.Nick Mathewson2021-12-081-1/+1
|
* Resolve XXXXs in proxy.rsNick Mathewson2021-12-081-3/+3
| | | | These issues all have tickets, so can become TODOs.
* More typo fixes that I forgot to save :(Nick Mathewson2021-11-241-1/+1
|