An implementation of Tor, in Rust. (So far, it's a not-very-complete client. But watch this space!)
  • Rust 96.4%
  • Python 1.7%
  • Shell 1%
  • RenderScript 0.4%
  • C 0.4%
Find a file
Nick Mathewson 4c1e172766 Merge branch 'metrics-yanked' into 'main'
Update to metrics 0.24.6

See merge request tpo/core/arti!3992
2026-05-13 19:22:57 -04:00
.gitlab/issue_templates Adds issue creation templates for bugs, features, proposals and documentation. 2020-12-17 13:57:06 -03:00
arti-corpora@fc8b082577 Bump to new version of arti-corpora 2023-08-02 18:01:57 -04:00
crates Merge branch 'arc_torclient' into 'main' 2026-05-13 18:26:44 -04:00
debian debian: Replace echo with idiomatic alternative 2026-02-23 17:42:09 +00:00
doc doc/dev/notes: A rough outline about how a vote is computed 2026-05-07 11:46:17 -04:00
examples Make all TorClient constructors wrap the TorClient in an Arc. 2026-05-13 16:44:51 -04:00
maint Upgrade rand crates to 0.10. 2026-05-12 16:55:43 -04:00
python reformat python to appease script. 2026-04-28 14:51:07 -04:00
tests integration-chutney-shadow: disable shadow spin-looping 2026-04-21 12:55:38 -05:00
web web: Update oniux 0.10.0 2026-03-31 14:31:02 +02:00
.appveyor.yml Use static-sqlite as feature flag for AppVeyor builds. 2022-08-30 21:47:30 +02:00
.ecrc Add editorconfig to force some rules (Final Newline) 2022-02-03 15:27:13 +00:00
.editorconfig arti: test: Add integration test suite for arti keys 2025-08-25 08:48:06 +02:00
.flake8 add flake8 exceptions for flake8-type-checking 2026-03-04 11:07:26 -06:00
.gitignore git: Ignore /tmp 2026-04-07 09:43:56 +02:00
.gitlab-ci.yml CI: Disable cargo-fuzz test for now 2026-05-13 14:56:43 +01:00
.gitmodules use https submodule 2021-08-30 16:22:38 +02:00
.mailmap meta: Use my new name 2024-06-15 11:56:57 +02:00
.typos.toml Fix some typos in comments. 2021-10-19 10:40:32 -04:00
Cargo.lock Update to metrics 0.24.6 2026-05-13 18:27:44 -04:00
Cargo.toml Merge branch 'publish' into 'main' 2026-05-12 08:31:24 -04:00
CHANGELOG.md Fix date typo in changelog. 2026-05-07 16:38:25 -04:00
clippy-nightly.toml clippy: Consolidate many lints in maint/add_warning 2022-06-24 14:23:38 +01:00
clippy-nontest.toml clippy-nontest.toml: Fix a typo 2024-10-15 14:10:55 +00:00
clippy.toml clippy: Add an xref re random_range to the comment 2026-05-13 14:10:52 +01:00
CODE_OF_CONDUCT Update the location of the code of conduct. 2024-05-29 16:00:48 -03:00
CONTRIBUTING.md docs: add CONTRIBUTING note about overlapping work 2026-04-28 21:38:57 -04:00
flake.lock arti: Add flake.nix for a dev environment 2025-09-24 11:33:07 +00:00
flake.nix Bump MSRV from 1.86 to 1.89 2026-02-16 15:22:24 +00:00
GPL-3 Ship GPL-3 alongside LGPL-3, as required 2024-04-25 17:12:47 +01:00
LGPL-3 Add LGPL-3.0 file 2024-04-25 17:12:47 +01:00
LICENSE-APACHE add licenses 2021-11-30 00:04:58 +10:00
LICENSE-MIT Update copyright year to 2025. 2025-01-06 08:40:00 -05:00
README.md README.md: Remove Roadmap section 2026-03-04 09:33:46 -05:00
tomlfmt.toml Lexically sort Cargo.toml dependencies 2022-05-28 20:05:51 +03:00
WANT_FROM_OTHER_CRATES WANT_FROM_OTHER_CRATES: Remove note about async-rustls 2023-07-17 10:01:18 -04:00

Crates.io

Arti: reimplementing Tor in Rust

Arti is a project to produce an embeddable, production-quality implementation of the Tor anonymity protocols in the Rust programming language.

This is the README for the Arti project as a whole. If you want to find more practical information you might want to check out these links:

Why rewrite Tor in Rust?

Rust is more secure than C. Despite our efforts, it's all too simple to mess up when using a language that does not enforce memory safety. We estimate that at least half of our tracked security vulnerabilities would have been impossible in Rust, and many of the others would have been very unlikely.

Rust enables faster development than C. Because of Rust's expressiveness and strong guarantees, we've found that we can be far more efficient and confident writing code in Rust. We hope that in the long run this will improve the pace of our software development.

Arti is more flexible than our C tor implementation. Unlike our C tor, which was designed as SOCKS proxy originally, and whose integration features were later "bolted on", Arti is designed from the ground up to work as a modular, embeddable library that other applications can use.

Arti is cleaner than our C tor implementation. Although we've tried to develop C tor well, we've learned a lot since we started it back in 2002. There are lots of places in the current C codebase where complicated "spaghetti" relationships between different pieces of code make our software needlessly hard to understand and improve.

Current status

Arti can connect to the Tor network, bootstrap a view of the Tor directory, and make anonymized connections over the network. Now that Arti has reached version 1.0.0, we believe it is suitable for actual use to anonymize connections.

There are a number of areas (especially at the lower layers) where APIs (especially internal APIs) are not stable, and we are likely to change them. Right now that includes the command line interface to the arti program.

And of course it's still very new so there are likely to be bugs.

Building and using Arti

Arti can act as a SOCKS proxy that uses the Tor network.

We expect to be providing official binaries soon. But, for now, you need to obtain a Rust development environment, and build it yourself.

To try it out, compile and run the arti binary using the below. It will open a SOCKS proxy on port 9150.

$ cargo run -p arti --locked --release -- proxy

You can build a binary (but not run it) with:

$ cargo build -p arti --locked --release

The result can be found as target/release/arti.

Safety Note: if you are using the default build options, the compiler will include filesystem path information in the binary that it generates. If your path is sensitive (for example, because it includes your username), you will want to take steps to prevent this. See doc/safer-build.md for more information.

Safety Note: when building arti for "production use", you should always use the -p arti option as documented above. While a cargo build without specifying the -p arti will still build arti, it may also enable unintended features (including experimental features) due to cargo feature unification.

If you run into any trouble building the program, please have a look at the troubleshooting guide.

Custom compile-time options

Arti has a number of configurable Cargo features that, among other things, can affect which asynchronous runtime to use.

See in the Arti crate-level docs for details.

Using Arti as a library

The arti command line utility is built on top of the arti_client library (and its dependencies).

That library's API will allow you to make connections over the Tor network, and obtain streams/sinks usable from async Rust.

We make fairly frequent semver bumps to the Arti library API, and to our lower-level crates. However, in practice, we don't often make disruptive changes that aren't easy to sort out in a dependency. When using Arti as a library, you should be prepared to make regular updates, bumping your versions requirement, not just cargo update. cargo upgrade can help with this.

See our version update and API compatibility policy for more details.

Minimum supported Rust Version

Our current Minimum Supported Rust Version (MSRV) is 1.89.

We may increase this MSRV as new Rust versions become available from the upstream Rust project. We allow upgrades of our MSRV to Rust X.Y.Z if Rust X.Y.0 was released within the last 7 months.

We won't increase MSRV just because we can: we'll only do so when we have a reason. (We don't guarantee that you'll agree with our reasoning; only that it will exist.)

How can I report bugs?

When you find bugs, please report them on our bugtracker.

If you don't already have an account there, you can report a bug anonymously or you can request an account.

How can I help out?

Have a look at our contributor guidelines for a few ideas on how to get started.

License

This code is licensed under either of

at your option.

However, some optional parts are licensed under the GNU Lesser General Public License, version 3.0, as indicated in the Cargo.toml. This applies to crates/equix and crates/hashx. See LGPL-and-rust.md for discussion of issues concerning redistributing binaries containing these crates.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

(The above notice, or something like it, seems to be pretty standard in Rust projects, so I'm using it here too. This instance of it is copied from the RustCrypto project's README.md file.)