[−][src]Struct tapir_cwtch::acns::tor::torrc::TorrcGenerator
Build a Torrc File with a set of configured options. Note: This is not a complete Torrc builder although it might one day grow to be one. As it stands it only allows the configuration options most necessary for Tor v3 Onion Service clients/servers as they related to Tapir/Cwtch. We use the Builder patter to allow easy programmatic construction for different Tor configurations.
Implementations
impl TorrcGenerator
[src]
pub fn new() -> TorrcGenerator
[src]
Generate a new, empty Torrc Generator.
pub fn with_socks_port(mut self: Self, socks_port: u16) -> Self
[src]
Configure Tor to open a port to connect to external servers over Tor via SOCKS5
pub fn with_control_port(mut self: Self, control_port: u16) -> Self
[src]
Configure Tor to have an open Control Port for configuration.
pub fn with_hashed_control_password(mut self: Self, password: &str) -> Self
[src]
Force the tor control port to accept a hashed password as authentication, the given password is hashed with a random salt From the Tor Docs: If the 'HashedControlPassword' option is set, it must contain the salted hash of a secret password. The salted hash is computed according to the S2K algorithm in RFC 2440 (OpenPGP), and prefixed with the s2k specifier. This is then encoded in hexadecimal, prefixed by the indicator sequence "16:".
pub fn build(&self, file_name: &str) -> Result<(), ACNError>
[src]
Compile the final torrc file and write it to the file system.
Auto Trait Implementations
impl RefUnwindSafe for TorrcGenerator
[src]
impl Send for TorrcGenerator
[src]
impl Sync for TorrcGenerator
[src]
impl Unpin for TorrcGenerator
[src]
impl UnwindSafe for TorrcGenerator
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,