Documentation ¶
Overview ¶
The minitunnel package implements bidirectional TCP tunnels over any io.ReadWriter. It does this in a way similar to the ssh -L command. Tunnel construction requires a source port, destination host, and destination port.
minitunnel supports multiple connections and multiple tunnels over a single transport.
Index ¶
Constants ¶
View Source
const ( HANDSHAKE = iota CONNECT CLOSED DATA FORWARD )
tunnel message types
View Source
const BufferSize = 32768
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
func ListenAndServe(transport io.ReadWriteCloser) error
Listen for an incoming Tunnel connection. Only one tunnel connection is permitted. ListenAndServe will block indefinitely until an error occurs.
Types ¶
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
func Dial ¶
func Dial(transport io.ReadWriteCloser) (*Tunnel, error)
Dial a listening minitunnel. Only one tunnel connection is permitted per transport.
Click to show internal directories.
Click to hide internal directories.