Obfs4 - The obfourscator - Pluggable Transport
An implementation of obfs4 in pure rust.
⚠️ 🚧 WARNING This crate is still under construction 🚧 ⚠️
- interface subject to change at any time
- Not production ready
- do not rely on this for any security critical applications
Installation
To install, add the following to your project's Cargo.toml:
[]
= "0.1.0"
Integration Examples
Client example using ptrs
use ;
use obfs4;
use TcpStream;
let args = from_str?;
let client = default
.options?
.build;
// future that opens a tcp connection when awaited
let conn_future = connect;
// await (create) the tcp conn, attempt to handshake, and return a wrapped Read/Write object on success.
let obfs4_conn = client.wrap.await?;
// ...
Server example
let message = b"Hello universe";
let = duplex;
let mut rng = thread_rng;
let o4_server = new_from_random;
spawn;
Server example using ptrs
use ;
...
// TODO fill out example
Loose Ends:
- server / client compatibility test go-to-rust and rust-to-go.
- double check the bit randomization and clearing for high two bits in the
dalekrepresentative - length distribution things
- iat mode handling
Performance
- comparison to golang
- comparison when kyber is enabled
- NaCl encryption library(s)