Struct ssh_jumper_model::SshTunnelParams[][src]

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

Parameters to create the SSH tunnel.

Fields

jump_host: HostSocketParams<'tunnel>

Jump host address and port.

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

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.

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.

Sets the local port to use.

Useful if you want use a known port for forwarding.

Sets the jump host port to use for SSH.

Useful if you do not want to use the default port for ssh.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.