tunnel

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var XTunnelHead = []byte("X-TUNNEL")

Functions

func SetLogLevel

func SetLogLevel(level string)

func SetLogger

func SetLogger(l *logger.Logger)

Types

type Client

type Client struct {
	Server      string
	Tunnel      Tunnel
	ForwardPort uint16
}

func (*Client) Connect

func (client *Client) Connect()

type Server

type Server struct {
	Port     uint16 // tunnel service port
	HTTPPort uint16
	// contains filtered or unexported fields
}

func (*Server) ActivateTunnel

func (s *Server) ActivateTunnel(name string, port uint16, maxConnections int, maxProxyLifetime int) *Tunnel

func (*Server) Serve

func (s *Server) Serve() (err error)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP() (err error)

type Tunnel

type Tunnel struct {
	Name             string
	Port             uint16
	MaxConnections   int
	MaxProxyLifetime int
	// contains filtered or unexported fields
}

func (*Tunnel) ListenAndServe

func (t *Tunnel) ListenAndServe()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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