summaryrefslogtreecommitdiff
path: root/crates/arti/src/subcommands/proxy.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'http-connect-wrapup' into 'main'Nick Mathewson2026-03-261-6/+5
|\ | | | | | | | | | | | | arti: Add option and documentation for http connect, then mark it stable. Closes #2409 See merge request tpo/core/arti!3811
| * arti: Add an option to disable http_connect.Nick Mathewson2026-03-251-6/+5
| | | | | | | | | | | | | | | | | | 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: Mostly make clippy happy for wasm with --no-default-features.Nick Mathewson2026-03-251-0/+1
|/ | | | | (With no-default-features there is no runtime, and that still causes a compiler error.)
* arti: Extract responsibility for port listing.Nick Mathewson2026-02-191-8/+20
| | | | | 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-3/+6
| | | | Part of #2301.
* arti: Refactor dns proxy launcher function.Nick Mathewson2026-02-191-3/+4
| | | | Part of #2301.
* arti: improve error message for invalid socks/dns portSteven Engler2026-02-021-10/+4
| | | | | | | | | | | Uses the standard clap error messages, for example: ```text $ cargo run -p arti -- proxy -p 123a error: invalid value '123a' for '-p <PORT>': invalid digit found in string For more information, try '--help'. ```
* arti: remove deprecated `proxy.dns_port` config optionSteven Engler2026-01-291-2/+2
|
* arti: remove deprecated `proxy.socks_port` config optionSteven Engler2026-01-291-3/+3
|
* arti: reword+reformat warning messageSteven Engler2026-01-291-1/+4
|
* arti: Do not panic when invalid ports are given as arguments to proxyNiel Duysters2026-01-301-2/+8
| | | | Use anyhow::Context to wrap error in useful message.
* arti: Move "port_info_file" configuration into "storage"Nick Mathewson2025-12-161-1/+1
| | | | | | This was a little funny, since the other storage elements are declared in tor-client. Fortunately, our stacked configuration logic handles this fine.
* arti: Export the chosen ports in a ports_info.json file.Nick Mathewson2025-12-161-8/+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-15/+19
| | | | | | | | | | | | | | 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-0/+3
|
* arti: Revise strings that implied that we were a SOCKS-only proxy.Nick Mathewson2025-10-281-4/+10
| | | | Closes #2225
* arti: Renaming around socks/generic proxiesNick Mathewson2025-10-281-1/+1
| | | | This is _all_ renaming and comment adjustments.
* Rename "arti::socks" to "arti::proxy".Nick Mathewson2025-10-281-2/+2
| | | | I'm about to add another proxy type.
* arti: Add skip_all to instrument call.Wesley Aptekar-Cassels2025-09-241-1/+1
|
* arti: Add skip_all to instrument macro.Wesley Aptekar-Cassels2025-09-241-1/+1
| | | | | | It's unlikely these arguments will be particularly useful, and omitting skip_all can have security implications, so it's better to avoid it to reflect good practice.
* opentelemetry: Add some instrument macros.Wesley Aptekar-Cassels2025-09-241-1/+4
| | | | | I've added these in places that are useful for the debugging that I've been doing.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+4
| | | | | | | | | | | | | | 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.
* arti: Optionally set up a Prometheus metrics exporterIan Jackson2025-04-081-0/+27
| | | | | | | | | | | | | New cargo feature `metrics`, currently experimental. New config option `metrics.prometheus.listen`. Uses standard `Listen` syntax, but not every configuration is supported due to upstream limitations. If the config option is set, use metrics-exporter-prometheus to offer an HTTP scrape endpoint. Or, if compiled out, fail. Currently there are no actual metrics exported at all.
* tor-rtcompat: Remove ToplevelBlockon from RuntimeIan Jackson2025-03-041-3/+3
| | | | | | | | Introduce ToplevelRuntime as an alias, and use it in the top-level programs. Now none of the principal protocol implementation code has access to the executor's toplevel entrypoint, and can't call it by mistake.
* arti: Make Rpc argument unconditional when constructing socks proxyNick Mathewson2025-01-231-19/+15
| | | | | | Formerly this was a conditional method argument, which is a huge antipattern. Now it is unconditionally present, as `Option<T>` for a type that is uninhabited when RPC isn't supported.
* arti: Use connect points to listen for RPC connections.Nick Mathewson2024-12-191-34/+17
|
* arti-client: add path resolver to `TorClient` and `TorClientConfig`Steven Engler2024-11-181-1/+1
| | | | | | Rather than using `arti_client::config::path_resolver()`, third-party code can get the path resolver using `TorClientConfig`s `AsRef<CfgPathResolver>` impl instead.
* update `CfgPath::path` to use a `CfgPathResolver`Steven Engler2024-11-181-1/+1
| | | | | | | | | | | | | | | | This is a big change across multiple crates since there isn't a good way to break it up. This changes the signature of `CfgPath::path` to: ``` pub fn path(&self, path_resolver: &CfgPathResolver) -> Result<PathBuf, CfgPathError> { ``` Making this change means that our global `CfgPathResolver` needs to be stored in the 'arti-client' library instead of `tor-config-path`, and must be passed through to anything that calls `path` to expand the variables.
* arti: Don't log that we are in SOCKS mode unless socks_listen is set.Gabriela Moldovan2024-09-171-6/+13
| | | | If `socks_listen` is disabled, we're not actually running in SOCKS mode.
* arti: Allow running hidden services with SOCKS/DNS ports disabled.Gabriela Moldovan2024-09-171-8/+18
| | | | Closes #1569
* arti: Move proxy subcommand to a separate module.Gabriela Moldovan2024-09-121-7/+37
| | | | | | | | No functional changes, this is just code motion. This helps organize the code in `arti/src/lib.rs` a bit. It now only contains the argument parsing and various other setup, and all the subcommands are contained in separate modules.
* arti: Move arti::run to subcommands::proxy.Gabriela Moldovan2024-09-121-2/+168
| | | | No functional changes, this is just code motion.
* arti: Add a new module for the proxy subcommand.Gabriela Moldovan2024-09-121-0/+17
The implementation for `arti proxy` will soon be relocated to this new module.