[][src]Crate libtor

libtor

Bundle and run Tor in your own project with this library!

Example

use libtor::{Tor, TorFlag, TorAddress, HiddenServiceVersion};

Tor::new()
    .flag(TorFlag::DataDirectory("/tmp/tor-rust".into()))
    .flag(TorFlag::SocksPort(19050))
    .flag(TorFlag::HiddenServiceDir("/tmp/tor-rust/hs-dir".into()))
    .flag(TorFlag::HiddenServiceVersion(HiddenServiceVersion::V3))
    .flag(TorFlag::HiddenServicePort(TorAddress::Port(8000), None.into()))
    .start()?;

Re-exports

pub use crate::hs::*;
pub use crate::log::*;
pub use crate::ports::*;

Modules

hs

Hidden services related flags

log

Log related flags

ports

ControlPort and SocksPort related flags

Structs

Tor

Configuration builder for a Tor daemon

Enums

Error

Error enum

SizeUnit

Enum that represents the size unit both in bytes and bits

TorAddress

Enum used to represent the generic concept of an "Address"

TorBool

Enum that represents an enum, rendered as 1 for true and 0 for false

TorFlag

Enum that represents a subset of the options supported by Tor