rust-pt

A Rust-based framework for Tor Pluggable Transports.

The only actively maintained and hand-written Rust PT framework.
Typed errors. Modern architecture. Clippy-pedantic clean.

✨ We welcome new contributors and stars! ⭐ ✨

🧅 Tor GitLab → Star on GitHub

Why this matters?

  1. 1. Human-written core. The core code is hand-written, so quality is guaranteed.
  2. 2. Maintained by someone who knows Tor. I am a contributor to Arti and rustls, so maintenance is guaranteed. tor-ptmgr is indeed a Rust implementation related to Tor, but it is a manager for the Tor server side and cannot implement PTs — though it is what you interact with. I am also a contributor to ptmgr and have read its source code; ptmgr is the Arti part I know best. Note that all the criticisms are only in the technical field. I respect every developer that I mentioned.
  3. 3. Tor officially asked for it. Tor officially expressed the need for a Rust framework.
  4. 4. The old option is dead. ptrs itself was never finished, and it stopped being maintained long ago, so it is unusable.
  5. 5. KISS by design. Unified architecture makes writing PTs in Rust simple.
  6. 6. Peer-reviewed. Reviewed by the authors of UAT (a QUIC-based PT) and ptrs-gesher.
  7. 7. Open to community review. Already publicly requested review on the mailing list. Some community members volunteered to review. Anti-censorship expressed interest, but due to workload, no review date can be guaranteed at this time.
  8. 8. No AI in the core. ptrs-gesher makes heavy use of AI, and its authors consider AI-driven development acceptable. Therefore, if you care about AI, that is another reason. Besides, ptrs-gesher's framework is not ready yet: it is currently more of a collection of PTs than a framework, and you cannot use ready-made features such as ExtOrPort. But it must be acknowledged that the author of ptrs-gesher is a really good, friendly person. I genuinely respect them. On a personal note: the relationship stayed at a single code review, simply because the other party is fond of AI. The author has said that because the Tor project officially rejects AI, he absolutely cannot use it — so the two never went further than that one review.
pt_err
Typed errors + derive macros
pt_tracing
PT-spec-compliant logging
pt_config
Env parsing + Config validation + derive macros
pt_core
ExtORPort + Other common implementation

Get Started

Add the crates to your Cargo.toml:

# Available on crates.io
      pt_err     = "*"
      pt_tracing = "*"
      pt_config  = "*"
      pt_core    = "*"

Or check out the full guide on GitHub:

Read the README on GitHub →

MISSION

To make writing Tor Pluggable Transports in Rust simple, safe, and maintainable — and to keep that tooling free, open, and human-written.