pub struct ChainEngine { /* private fields */ }Expand description
Routes outbound TCP connections through a configurable chain of proxies.
Implementations§
Source§impl ChainEngine
impl ChainEngine
Sourcepub fn new(config: ChainConfig) -> Self
pub fn new(config: ChainConfig) -> Self
Create a new engine from config.
Sourcepub async fn connect(&self, target: Target) -> Result<BoxStream>
pub async fn connect(&self, target: Target) -> Result<BoxStream>
Open a connection to target through the proxy chain.
If the target matches a localnet rule, a direct connection is made.
DNAT rewrites are applied before localnet and proxy selection.
Returns a BoxStream so that TLS-wrapped hops (HTTPS proxies) and
plain TCP hops share the same return type.
Auto Trait Implementations§
impl !Freeze for ChainEngine
impl RefUnwindSafe for ChainEngine
impl Send for ChainEngine
impl Sync for ChainEngine
impl Unpin for ChainEngine
impl UnsafeUnpin for ChainEngine
impl UnwindSafe for ChainEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more