tunnel

package
v0.0.0-...-1ef8d7c Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONN_CLIENT_CONTROL = uint8(1)
	CONN_SERVER         = uint8(4)
	CONN_CLIENT         = uint8(5)
)
View Source
const (
	CONN_SERVER_MUX = uint8(6)
	CONN_CLIENT_MUX = uint8(7)
)

Variables

This section is empty.

Functions

func NewTunnelBridge

func NewTunnelBridge() services.Service

func NewTunnelClient

func NewTunnelClient() services.Service

func NewTunnelServer

func NewTunnelServer() services.Service

func NewTunnelServerManager

func NewTunnelServerManager() services.Service

Types

type ServerConn

type ServerConn struct {
	//ClientLocalAddr string //tcp:2.2.22:333@ID
	Conn *net.Conn
}

type TunnelBridge

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

func (*TunnelBridge) CheckArgs

func (s *TunnelBridge) CheckArgs() (err error)

func (*TunnelBridge) Clean

func (s *TunnelBridge) Clean()

func (*TunnelBridge) InitService

func (s *TunnelBridge) InitService() (err error)

func (*TunnelBridge) Start

func (s *TunnelBridge) Start(args interface{}, log *logger.Logger) (err error)

func (*TunnelBridge) StopService

func (s *TunnelBridge) StopService()

type TunnelBridgeArgs

type TunnelBridgeArgs struct {
	Parent    *string
	CertFile  *string
	KeyFile   *string
	CertBytes []byte
	KeyBytes  []byte
	Local     *string
	Timeout   *int
	Mux       *bool
}

type TunnelClient

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

func (*TunnelClient) CheckArgs

func (s *TunnelClient) CheckArgs() (err error)

func (*TunnelClient) Clean

func (s *TunnelClient) Clean()

func (*TunnelClient) GetConn

func (s *TunnelClient) GetConn() (conn net.Conn, err error)

func (*TunnelClient) GetInConn

func (s *TunnelClient) GetInConn(typ uint8, data ...string) (outConn net.Conn, err error)

func (*TunnelClient) InitService

func (s *TunnelClient) InitService() (err error)

func (*TunnelClient) ServeConn

func (s *TunnelClient) ServeConn(localAddr, ID, serverID string)

func (*TunnelClient) ServeUDP

func (s *TunnelClient) ServeUDP(localAddr, ID, serverID string)

func (*TunnelClient) Start

func (s *TunnelClient) Start(args interface{}, log *logger.Logger) (err error)

func (*TunnelClient) StopService

func (s *TunnelClient) StopService()

type TunnelClientArgs

type TunnelClientArgs struct {
	Parent    *string
	CertFile  *string
	KeyFile   *string
	CertBytes []byte
	KeyBytes  []byte
	Key       *string
	Timeout   *int
	Mux       *bool
}

type TunnelServer

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

func (*TunnelServer) CheckArgs

func (s *TunnelServer) CheckArgs() (err error)

func (*TunnelServer) Clean

func (s *TunnelServer) Clean()

func (*TunnelServer) GetConn

func (s *TunnelServer) GetConn() (conn net.Conn, err error)

func (*TunnelServer) GetOutConn

func (s *TunnelServer) GetOutConn(typ uint8) (outConn net.Conn, ID string, err error)

func (*TunnelServer) InitService

func (s *TunnelServer) InitService() (err error)

func (*TunnelServer) Start

func (s *TunnelServer) Start(args interface{}, log *logger.Logger) (err error)

func (*TunnelServer) StopService

func (s *TunnelServer) StopService()

func (*TunnelServer) UDPConnDeamon

func (s *TunnelServer) UDPConnDeamon()

type TunnelServerArgs

type TunnelServerArgs struct {
	Parent    *string
	CertFile  *string
	KeyFile   *string
	CertBytes []byte
	KeyBytes  []byte
	Local     *string
	IsUDP     *bool
	Key       *string
	Remote    *string
	Timeout   *int
	Route     *[]string
	Mgr       *TunnelServerManager
	Mux       *bool
}

type TunnelServerManager

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

func (*TunnelServerManager) CheckArgs

func (s *TunnelServerManager) CheckArgs() (err error)

func (*TunnelServerManager) Clean

func (s *TunnelServerManager) Clean()

func (*TunnelServerManager) GetConn

func (s *TunnelServerManager) GetConn() (conn net.Conn, err error)

func (*TunnelServerManager) GetOutConn

func (s *TunnelServerManager) GetOutConn(typ uint8) (outConn net.Conn, ID string, err error)

func (*TunnelServerManager) InitService

func (s *TunnelServerManager) InitService() (err error)

func (*TunnelServerManager) Start

func (s *TunnelServerManager) Start(args interface{}, log *logger.Logger) (err error)

func (*TunnelServerManager) StopService

func (s *TunnelServerManager) StopService()

type UDPItem

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

Jump to

Keyboard shortcuts

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