#onion-service #tor #tokio #controller #onion

torut

torut is reasonable tor controller written in rust utilizing tokio for async communication

13 releases

0.2.1 Oct 31, 2021
0.1.10 Jul 2, 2021
0.1.8 Mar 31, 2021
0.1.7 Nov 24, 2020
0.1.1 Jan 4, 2020

#1770 in Network programming

Download history 496/week @ 2024-06-18 238/week @ 2024-06-25 229/week @ 2024-07-02 229/week @ 2024-07-09 271/week @ 2024-07-16 445/week @ 2024-07-23 273/week @ 2024-07-30 417/week @ 2024-08-06 333/week @ 2024-08-13 535/week @ 2024-08-20 746/week @ 2024-08-27 455/week @ 2024-09-03 462/week @ 2024-09-10 634/week @ 2024-09-17 406/week @ 2024-09-24 268/week @ 2024-10-01

1,873 downloads per month
Used in 22 crates (5 directly)

MIT license

155KB
3K SLoC

torut

Build Status

Torut is tor controller written in rust similar to stem or bine. It tries to reasonably implement specification of tor control port proto It works asynchronously with tokio and async/await.

It implements onion service key and address generation and serialization on its own without tor process.

Right now logic is quite tightly coupled with tokio so there is no way to remove tokio from dependencies and make all functions synchronous.

Status of onion service V2

Code handling V2 services has been removed in 0.2 release, since tor project removed(should have?) v2 handling code from their codebase as well. See This page

Testing

Tests in torut are split into two parts: these which do use tor and these which do not use tor. In order to enable tests which use tor use RUSTFLAGS="--cfg=testtor" and provide TORUT_TESTING_TOR_BINARY environment variable containing path to tor binary. Testing tor binary MUST be run with --test-threads=1 for instance like:

$ RUSTFLAGS="--cfg testtor" cargo test -- --test-threads=1

Dependencies

~0.3–7MB
~50K SLoC