ptrs-gesher
Umbrella crate that re-exports the entire ptrs-gesher pluggable
transports framework behind a single dependency.
What this crate does
ptrs-gesher is the single-dependency entry point for the
ptrs-gesher framework.
It re-exports core types (Args, ClientBuilder, ClientTransport,
BridgeLine, Obfs4PT, WebTunnelBuilder) at the top level for
convenience, and also exposes the underlying crate modules (ptrs,
obfs4, webtunnel, bridge_line, lyrebird) for deeper access.
Feature flags
| Flag | Default | What it pulls in |
|---|---|---|
obfs4 |
on | ptrs-gesher-obfs4 — obfs4 transport |
webtunnel |
on | ptrs-gesher-webtunnel — WebTunnel |
bridge-line |
on | ptrs-gesher-bridge-line — bridge parser |
lyrebird |
off | ptrs-gesher-lyrebird — PT-manager loop |
Status
The current crate requires Rust 1.92 or newer. It introduces breaking changes from 0.5.x, including WebTunnel carrier output types and argument parsing. Read the 0.6 migration guide before upgrading. The managed server remains experimental and disabled by default. Not production ready; do not rely on this for security-critical applications.
Example
use ;
use ClientBuilder as _;
// Parse a torrc bridge line.
let bridge: BridgeLine =
"obfs4 1.2.3.4:443 ABCDEF0123456789ABCDEF0123456789ABCDEF01 cert=AAA iat-mode=0"
.parse
.unwrap;
assert_eq!;
// Convert its key=value params into Args for the transport builder.
let mut args = new;
for in &bridge.params
// Look up the transport name.
assert_eq!;
License
Dual-licensed under either:
- Apache License, Version 2.0
- MIT license
at your option.