arti

A minimal command line program for connecting to the Tor network

(If you want a more general Tor client library interface, use [arti_client].)

This crate is the primary command-line interface for Arti, a project to implement Tor in Rust.

Currently Arti can can run as a simple SOCKS proxy over the Tor network. It will listen on port 9150 by default, but you can override this in the configuration. You can direct programs to connect via that SOCKS port, and their connections will be anonymized via Tor. Note: you might not want to run a conventional web browser this way. Browsers leak much private information. To browse the web anonymously, we recommend using Tor Browser.

Arti is still advancing rapidly; we are adding features and eventually we hope it will be able to replace C Tor.

Command-line interface

(This is not stable; future versions will break this.)

arti uses the clap crate for command-line argument parsing; run arti help to get it to print its documentation.

The only currently implemented subcommand is arti proxy; try arti help proxy for a list of options you can pass to it.

Configuration

By default, arti looks for its configuration files in a platform-dependent location.

| OS | Configuration File | |---------|----------------------------------------------------| | Unix | ~/.config/arti/arti.toml | | macOS | ~/Library/Application Support/arti/arti.toml | | Windows | \Users\<USERNAME>\AppData\Roaming\arti\arti.toml |

The configuration file is TOML. For an example see arti-example-config.toml (a copy of which is in the source tree, and also in the Arti repository). That example config file documents the configuration options.

More detailed information about for the individual fields is available in the documentation for the Rust APIs [ApplicationConfigBuilder] and TorClientConfigBuilder.

Using Arti with Tor Browser

It is possible to hook up Arti with Tor Browser.

To do so, we will launch arti independently from Tor Browser. Build arti with cargo build --release. After that launch it with some basic configuration parameters:

$ ./target/release/arti proxy -l debug -p 9150

This will ensure that arti sets its SOCKS port on 9150. Now we need to launch Tor Browser and instruct it to use that SOCKS port.

Linux

$ TOR_SKIP_LAUNCH=1 TOR_SOCKS_PORT=9150 TOR_SKIP_CONTROLPORTTEST=1 ./start-tor-browser.desktop

OS X

$ TOR_SKIP_LAUNCH=1 TOR_SOCKS_PORT=9150 TOR_SKIP_CONTROLPORTTEST=1 /path/to/Tor\ Browser/Contents/MacOS/firefox

Windows

Create a shortcut with the Target set to:

C:\Windows\System32\cmd.exe /c "SET TOR_SKIP_LAUNCH=1&& SET TOR_SOCKS_PORT=9150&& TOR_SKIP_CONTROLPORTTEST=1&& START /D ^"C:\path\to\Tor Browser\Browser^" firefox.exe"

and Start in set to:

"C:\path\to\Tor Browser\Browser"

(You may need to adjust the actual path to wherever you have put your Tor Browser.)

The resulting Tor Browser should be using arti. Note that onion services and bridges won't work (Arti doesn't support them yet), and neither will any feature depending on Tor's control-port protocol. Features not depending on the control-port such as the "New circuit for this site" button should work.

Compile-time features

Additive features

Build-flag related features

Cryptographic acceleration features

Libraries should not enable these by default, since they replace one implementation with another.

Experimental features

Note that the APIs enabled by these features are NOT covered by semantic versioning[^1] guarantees: we might break them or remove them between patch versions.

work reliably. To be explicit, if you want cargo update to only make correct changes, then you cannot enable these features.

Limitations

There are many missing features. Among them: there's no onion service support yet. There's no anti-censorship support. You can't be a relay. There isn't any kind of proxy besides SOCKS.

See the repository README file for a more complete list of missing features.

Library for building command-line client

This library crate contains code useful for making a command line program similar to arti. The API should not be considered stable.

License: MIT OR Apache-2.0