pub enum ForwardKind {
Tcp {
host: String,
port: u16,
},
Socks5,
StreamLocal {
socket_path: String,
},
}Expand description
What an accepted local connection is forwarded to.
Variants§
Tcp
Fixed host:port on the remote side (direct-tcpip).
Socks5
SOCKS5 proxy: the client names a target per connection (G-TUN-R02).
StreamLocal
Remote Unix domain socket (direct-streamlocal, G-TUN-R03).
Implementations§
Source§impl ForwardKind
impl ForwardKind
Sourcepub fn mode_label(&self) -> &'static str
pub fn mode_label(&self) -> &'static str
Wire label used in the tunnel_listening / tunnel_closed events.
Sourcepub fn event_host(&self) -> String
pub fn event_host(&self) -> String
Host reported in the listening event (* when chosen per connection).
Sourcepub fn event_port(&self) -> u16
pub fn event_port(&self) -> u16
Port reported in the listening event (0 when not applicable).
Trait Implementations§
Source§impl Clone for ForwardKind
impl Clone for ForwardKind
Source§fn clone(&self) -> ForwardKind
fn clone(&self) -> ForwardKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ForwardKind
impl RefUnwindSafe for ForwardKind
impl Send for ForwardKind
impl Sync for ForwardKind
impl Unpin for ForwardKind
impl UnsafeUnpin for ForwardKind
impl UnwindSafe for ForwardKind
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