tunnel

package
v0.0.4-beta3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NotFound = `HTTP/1.1 404 Not Found
Content-Length: %d

Tunnel %s not found
`
)

Variables

This section is empty.

Functions

func NewTunnelClient

func NewTunnelClient(
	sess *yamux.Session,
	localAddress string,
) *tunnelClient

func NewTunnelServerInstance

func NewTunnelServerInstance(
	registry registry.TunnelRegistry,
	tunnelListener net.Listener,
	serverListener net.Listener,
	adminListener net.Listener,
	defaultDomain string,
	certificates []tls.Certificate,
) *instance

Types

type Conn

type Conn struct {
	// Peeked are the bytes that have been read from Conn for the
	// purposes of route matching, but have not yet been consumed
	// by Read calls. It set to nil by Read when fully consumed.
	Peeked []byte

	// Conn is the underlying connection.
	// It can be type asserted against *net.TCPConn or other types
	// as needed. It should not be read from directly unless
	// Peeked is nil.
	WriteCloser
}

func (*Conn) Read

func (c *Conn) Read(p []byte) (n int, err error)

Read reads bytes from the connection (using the buffer prior to actually reading).

type WriteCloser

type WriteCloser interface {
	net.Conn
	// CloseWrite on a network connection, indicates that the issuer of the call
	// has terminated sending on that connection.
	// It corresponds to sending a FIN packet.
	CloseWrite() error
}

WriteCloser describes a net.Conn with a CloseWrite method.

Jump to

Keyboard shortcuts

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