arti
Arti — pure-Rust implementation of the Tor anonymity network, by Tor Project. Embeddable Tor client (no system Tor daemon needed), provides SOCKS proxy and programmatic API for connecting to .onion services or routing clearnet traffic through Tor. Used by privacy-respecting wallets (BHODL-style), messenger apps, and any Rust app needing anonymity. Ships as library (arti-client crate) or standalone CLI. USE WHEN: user mentions "arti", "Tor in Rust", "embedded Tor", "arti-client", "Tor circuit Rust", "onion service Rust", "TorClient", "BridgeConfig", "PreferredRuntime" DO NOT USE FOR: Bitcoin Core + Tor configuration - use `bitcoin/privacy/tor` DO NOT USE FOR: Browsing via Tor Browser - end-user tool, not dev DO NOT USE FOR: TLS configuration - use `network/rustls`
What this skill does
# Arti — Tor in Rust
> **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `arti`.
## Why Arti
Arti is the **next-generation Tor implementation**, written in Rust. Replaces the C `tor` daemon for embedded use cases. Since v1.2.0+ (2024) it's stable enough for production embed in apps.
| Feature | Arti | C tor (legacy) |
|---|---|---|
| Language | Rust (memory safe) | C |
| Embedding API | ✅ Native (`arti-client`) | ❌ Requires running daemon |
| Async | ✅ Built on Tokio/async-std | Manual threading |
| Memory safety | ✅ | Periodic CVEs |
| Onion services | ✅ Stable since 1.2 | Original support |
| Bridges (obfs4, snowflake) | ✅ Plugin system | ✅ Mature |
| iOS/Android support | ✅ Cross-compile + UniFFI bindings | Hard |
| HSv2 (deprecated) | ❌ | Removed |
For BHODL-style wallets: ideal — embed Tor without bundling a binary or requiring the user to install Tor.
## Setup
```toml
[dependencies]
arti-client = { version = "0.27", features = ["tokio", "rustls"] }
tor-rtcompat = "0.27"
tokio = { version = "1", features = ["full"] }
```
Features:
- `tokio` (default) or `async-std` runtime
- `rustls` (default) or `native-tls` for TLS
- `bridge-client` — connect via bridges (obfs4, snowflake)
- `pt-client` — pluggable transports
- `onion-service-client` — connect to .onion (default)
- `onion-service-service` — host .onion (more advanced)
## Hello World — TCP Connection Through Tor
```rust
use arti_client::{TorClient, TorClientConfig};
use tor_rtcompat::PreferredRuntime;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = TorClientConfig::default();
let runtime = PreferredRuntime::current()?;
println!("Bootstrapping Tor (this can take a minute)...");
let tor = TorClient::with_runtime(runtime)
.config(config)
.create_bootstrapped()
.await?;
println!("Connected to Tor network!");
// Connect to a clearnet site through Tor
let mut stream = tor.connect(("check.torproject.org", 80)).await?;
// Or to a .onion v3 address
let mut onion_stream = tor.connect((
"duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion",
80,
)).await?;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
onion_stream.write_all(b"GET / HTTP/1.0\r\nHost: duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion\r\n\r\n").await?;
let mut response = String::new();
onion_stream.read_to_string(&mut response).await?;
println!("{}", response);
Ok(())
}
```
First-time bootstrap downloads the Tor consensus (~5-10 MB). Subsequent runs use cached data (faster).
## TorClient with HTTP
For HTTP through Tor, layer with reqwest or hyper:
```toml
[dependencies]
arti-client = { version = "0.27", features = ["tokio", "rustls"] }
arti-hyper = "0.27"
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
hyper = "1"
```
```rust
use arti_client::TorClient;
use arti_hyper::ArtiHttpConnector;
use hyper::Client;
use tls_api::{TlsConnector, TlsConnectorBuilder};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let tor = TorClient::create_bootstrapped(Default::default()).await?;
let tls_connector = tls_api_native_tls::TlsConnector::builder()?.build()?;
let connector = ArtiHttpConnector::new(tor, tls_connector);
let http: Client<_, hyper::Body> = Client::builder().build(connector);
let resp = http
.get("https://check.torproject.org".parse()?)
.await?;
println!("Status: {}", resp.status());
Ok(())
}
```
## Persistent Configuration
For production: persist Tor state to disk (cached descriptors, circuits) — much faster restarts.
```rust
use arti_client::{TorClient, TorClientConfig};
use std::path::PathBuf;
let mut config = TorClientConfig::builder();
config.storage()
.cache_dir(PathBuf::from("/path/to/cache").into())
.state_dir(PathBuf::from("/path/to/state").into());
let config = config.build()?;
let tor = TorClient::create_bootstrapped(config).await?;
```
State dir holds:
- Cached relay descriptors
- Onion service descriptor cache
- Guard nodes (don't change between sessions)
For mobile apps: use platform's app-private dir (filesDir on Android, Documents on iOS).
## Bridges (Obfuscated Tor)
For users in censored networks. Bridges hide that you're using Tor.
```toml
[dependencies]
arti-client = { version = "0.27", features = ["tokio", "rustls", "bridge-client", "pt-client"] }
tor-pt-client = "0.27"
```
```rust
use arti_client::config::pt::TransportConfigBuilder;
use arti_client::config::BridgeConfigBuilder;
let mut config_builder = TorClientConfig::builder();
// Add a bridge (example obfs4)
let bridge: BridgeConfigBuilder = "obfs4 IP:PORT FINGERPRINT cert=... iat-mode=0"
.parse()?;
config_builder.bridges().bridges().push(bridge);
// Configure obfs4 transport binary
let mut transport = TransportConfigBuilder::default();
transport.protocols(vec!["obfs4".parse()?]);
transport.path(CfgPath::new("/usr/local/bin/obfs4proxy".into()));
config_builder.bridges().transports().push(transport);
let tor = TorClient::create_bootstrapped(config_builder.build()?).await?;
```
For mobile, use **Snowflake** (browser-based bridges, no binary install needed).
## SOCKS5 Proxy Mode
If you have legacy code that talks to a Tor SOCKS proxy, run Arti in proxy mode:
```bash
arti proxy -l 127.0.0.1:9150
```
Then existing apps using SOCKS5 work unchanged.
Programmatically:
```rust
use arti::cfg::ArtiCombinedConfig;
use arti::socks::run_socks_proxy;
let combined = ArtiCombinedConfig::default();
let runtime = PreferredRuntime::current()?;
run_socks_proxy(runtime, &combined.client, &combined.proxy).await?;
```
## Connecting to BHODL-Style Backends Over Tor
Wallet backends often expose `.onion` for privacy. Arti makes this trivial:
```rust
async fn fetch_balance(tor: &TorClient<PreferredRuntime>, address: &str) -> Result<u64> {
let mut stream = tor.connect((
"mempoolhqx4isw62xs7abwphsq7ldayuidyx2v2oethdhhj6mlo2r6ad.onion",
443,
)).await?;
// ... TLS handshake (use rustls), HTTP/JSON request
Ok(0)
}
```
For BDK + Tor:
```rust
use bdk_esplora::EsploraAsyncExt;
use bdk_esplora::esplora_client;
async fn sync_with_tor(wallet: &mut Wallet, tor: TorClient<PreferredRuntime>) -> Result<()> {
let arti_connector = ArtiHttpConnector::new(tor, /* tls */);
let http_client = reqwest::Client::builder()
.connector(arti_connector)
.build()?;
let client = esplora_client::Builder::new("https://mempool.space/api")
.client(http_client)
.build_async()?;
wallet.sync(&client, /* ... */).await?;
Ok(())
}
```
## Mobile Integration (BHODL Pattern)
Arti compiles for Android (via cargo-ndk) and iOS (native Cargo). Embed in KMP shared module via UniFFI.
```rust
// crates/bhodl-tor-ffi/src/lib.rs
use arti_client::{TorClient, TorClientConfig};
use std::sync::Arc;
use tokio::sync::Mutex;
#[derive(uniffi::Object)]
pub struct BhodlTor {
inner: Mutex<Option<TorClient<PreferredRuntime>>>,
}
#[uniffi::export(async_runtime = "tokio")]
impl BhodlTor {
#[uniffi::constructor]
pub fn new() -> Arc<Self> {
Arc::new(BhodlTor {
inner: Mutex::new(None),
})
}
pub async fn bootstrap(&self, cache_dir: String) -> Result<(), TorError> {
let mut config = TorClientConfig::builder();
config.storage()
.cache_dir(PathBuf::from(&cache_dir).into())
.state_dir(PathBuf::from(&cache_dir).join("state").into());
let tor = TorClient::create_bootstrapped(config.build()?).await?;
*self.inner.lock().await = Some(tor);
Ok(())
}
pub async fn is_ready(&self) -> bool {
self.inner.lock().await.is_some()
}
}
```
Bootstrap takes 30-60s on first run, ~5s after with persisted state. UI must show progress.
## Bootstrap Status
Track bootstrap progress for UX:
```rust
use arti_clieRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.