tunnel

package
v0.0.0-...-d0fea3d Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(isServerSide bool, outbound chan []byte, sm *session.Manager) *Manager

func (*Manager) Close

func (manager *Manager) Close() error

func (*Manager) HandleIn

func (manager *Manager) HandleIn(payload []byte) error

func (*Manager) TunnelCreate

func (manager *Manager) TunnelCreate(cfg *TunnelConfig) (*Tunnel, error)

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool(isServerSide bool) *Pool

func (*Pool) Delete

func (p *Pool) Delete(t *Tunnel) error

func (*Pool) Exist

func (p *Pool) Exist(id uint32) bool

func (*Pool) Get

func (p *Pool) Get(id uint32) *Tunnel

func (*Pool) New

func (p *Pool) New(manager *Manager, cfg *TunnelConfig) (*Tunnel, error)

type Tunnel

type Tunnel struct {
	ID     uint32
	Config *TunnelConfig
	// contains filtered or unexported fields
}

Tunnel define a tunnel struct

func (*Tunnel) HandleChannelClose

func (t *Tunnel) HandleChannelClose(m *tcommon.TMSG) error

func (*Tunnel) HandleIn

func (t *Tunnel) HandleIn(m *tcommon.TMSG) (err error)

func (*Tunnel) Listen

func (t *Tunnel) Listen() error

func (*Tunnel) NewChannelByConn

func (t *Tunnel) NewChannelByConn(conn net.Conn) channel.Channel

func (*Tunnel) ServeChannel

func (t *Tunnel) ServeChannel(c channel.Channel)

func (*Tunnel) String

func (t *Tunnel) String() string

type TunnelConfig

type TunnelConfig struct {
	ID         uint32
	Proto      string // TCP or UDP
	LocalHost  string
	LocalPort  int
	RemoteHost string
	RemotePort int
	Reverse    bool
}

func (*TunnelConfig) RemoteConfig

func (c *TunnelConfig) RemoteConfig() *TunnelConfig

func (*TunnelConfig) String

func (c *TunnelConfig) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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