forward

package
v0.0.0-...-ef38420 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BiCopy

func BiCopy(a, b io.ReadWriteCloser)

BiCopy copies data bidirectionally between two read-write-closers.

func HostFromTarget

func HostFromTarget(target string) string

HostFromTarget extracts the host from a host:port string.

func PortFromTarget

func PortFromTarget(target string) uint32

PortFromTarget extracts the port from a host:port string, defaulting to 22.

func RunStdioForward

func RunStdioForward(sshClient *ssh.Client, target string) int

RunStdioForward connects stdin/stdout to a direct-tcpip channel. Returns the process exit code.

Types

type Handler

type Handler struct {
	Logger sshclient.Logger
}

Handler implements sshclient.ForwardHandler.

func NewHandler

func NewHandler(logger sshclient.Logger) *Handler

NewHandler creates a Handler with the given logger.

func (*Handler) SetupForwarding

func (h *Handler) SetupForwarding(sshClient *ssh.Client, opts *sshclient.Options) error

SetupForwarding sets up local, remote, and dynamic port forwarding.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL