Skip to main content

Module ipc

Module ipc 

Source
Expand description

Launching pluggable transport binaries and communicating with them.

This module contains utilities to launch pluggable transports supporting pt-spec.txt version 1, and communicate with them in order to specify configuration parameters and receive updates as to the current state of the PT.

Re-exportsยง

use crate::PtClientMethod; ๐Ÿ”’
use crate::err; ๐Ÿ”’
use crate::err::PtError; ๐Ÿ”’
use futures::StreamExt; ๐Ÿ”’
use futures::channel::mpsc::Receiver; ๐Ÿ”’
use itertools::Itertools; ๐Ÿ”’
use std::borrow::Cow; ๐Ÿ”’
use std::collections::HashMap; ๐Ÿ”’
use std::ffi::OsString; ๐Ÿ”’
use std::io::BufRead; ๐Ÿ”’
use std::io::BufReader; ๐Ÿ”’
use std::net::Ipv4Addr; ๐Ÿ”’
use std::net::Ipv6Addr; ๐Ÿ”’
use std::net::SocketAddr; ๐Ÿ”’
use std::path::PathBuf; ๐Ÿ”’
use std::process::Child; ๐Ÿ”’
use std::process::Command; ๐Ÿ”’
use std::process::Stdio; ๐Ÿ”’
use std::str::FromStr; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::io; ๐Ÿ”’
use std::thread; ๐Ÿ”’
use tor_basic_utils::PathExt as _; ๐Ÿ”’
use tor_error::internal; ๐Ÿ”’
use tor_error::warn_report; ๐Ÿ”’
use tor_linkspec::PtTransportName; ๐Ÿ”’
use tor_rtcompat::Runtime; ๐Ÿ”’
use tor_rtcompat::SleepProviderExt; ๐Ÿ”’
use tor_socksproto::SocksVersion; ๐Ÿ”’
use tracing::debug; ๐Ÿ”’
use tracing::error; ๐Ÿ”’
use tracing::info; ๐Ÿ”’
use tracing::trace; ๐Ÿ”’
use tracing::warn; ๐Ÿ”’
use web_time_compat::Duration; ๐Ÿ”’
use web_time_compat::Instant; ๐Ÿ”’
use web_time_compat::InstantExt; ๐Ÿ”’
use sealed::*; ๐Ÿ”’

Modulesยง

sealed ๐Ÿ”’
Sealed trait to protect private types and default trait implementations

Structsยง

PluggableClientTransport
A pluggable transport binary in a child process.
PluggableServerTransport
A pluggable transport server binary in a child process.
PtClientParameters
Parameters passed only to a pluggable transport client.
PtClientParametersBuilder
Builder for PtClientParameters.
PtCommonParameters
Common parameters passed to a pluggable transport.
PtCommonParametersBuilder
Builder for PtCommonParameters.
PtServerParameters
Parameters passed only to a pluggable transport server.
PtServerParametersBuilder
Builder for PtServerParameters.
PtStatus
An arbitrary key/value status update from a pluggable transport.

Enumsยง

PtClientParametersBuilderError
Error type for PtClientParametersBuilder
PtCommonParametersBuilderError
Error type for PtCommonParametersBuilder
PtMessage
A message sent from a pluggable transport child process.
PtServerParametersBuilderError
Error type for PtServerParametersBuilder

Constantsยง

GRACEFUL_EXIT_TIME ๐Ÿ”’
Amount of time we give a pluggable transport child process to exit gracefully.
PT_START_TIMEOUT ๐Ÿ”’
Default timeout for PT binary startup.
PT_STDIO_BUFFER ๐Ÿ”’
Size for the buffer storing pluggable transport stdout lines.

Traitsยง

PluggableTransport
Common functionality implemented to allow code reuse

Functionsยง

parse_one_smethod_arg ๐Ÿ”’
Chomp one key/value pair off a list of smethod args. Returns (k, v, unparsed rest of string). Will also chomp the comma at the end, if there is one.
parse_one_value ๐Ÿ”’
Parse a value (something on the RHS of an =), which could be a CString as defined by control-spec.txt ยง2. Returns (value, unparsed rest of string).