Struct ssh_jumper_model::SshTunnelParams[][src]

pub struct SshTunnelParams<'tunnel> {
    pub jump_host: HostAddress<'tunnel>,
    pub jump_host_auth_params: JumpHostAuthParams<'tunnel>,
    pub local_socket: SocketAddr,
    pub target_socket: HostSocketParams<'tunnel>,
}

Parameters to create the SSH tunnel.

Fields

jump_host: HostAddress<'tunnel>

Jump host address.

jump_host_auth_params: JumpHostAuthParams<'tunnel>

SSH auth params for the jump host.

local_socket: SocketAddr

Local socket to forward to the target host.

target_socket: HostSocketParams<'tunnel>

Target host address and port.

Implementations

impl<'tunnel> SshTunnelParams<'tunnel>[src]

pub fn new(
    jump_host: HostAddress<'tunnel>,
    jump_host_auth_params: JumpHostAuthParams<'tunnel>,
    target_socket: HostSocketParams<'tunnel>
) -> Self
[src]

Returns new SshTunnelParams.

The local socket IP is defaulted to 127.0.0.1. Use the with_local_ip method if you would like to change this.

The local socket port is defaulted to 0, which means the operating system will allocate a port upon binding. Use the with_local_port method if you would like to change this.

pub fn with_local_ip(self, ip: IpAddr) -> Self[src]

Sets the local IP to use.

Useful if you are connecting over a VPN, and need to bind to the local IP for that network interface.

pub fn with_local_port(self, port: u16) -> Self[src]

Sets the local port to use.

Useful if you want use a known port for forwarding.

Trait Implementations

impl<'tunnel> Clone for SshTunnelParams<'tunnel>[src]

impl<'tunnel> Debug for SshTunnelParams<'tunnel>[src]

Auto Trait Implementations

impl<'tunnel> RefUnwindSafe for SshTunnelParams<'tunnel>

impl<'tunnel> Send for SshTunnelParams<'tunnel>

impl<'tunnel> Sync for SshTunnelParams<'tunnel>

impl<'tunnel> Unpin for SshTunnelParams<'tunnel>

impl<'tunnel> UnwindSafe for SshTunnelParams<'tunnel>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,