tunnel

package
v10.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONN_CLIENT_CONTROL = uint8(1)
	CONN_SERVER         = uint8(4)
	CONN_CLIENT         = uint8(5)
)

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 ClientUDPConnItem

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

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
}

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()

func (*TunnelClient) UDPGCDeamon

func (s *TunnelClient) UDPGCDeamon()

func (*TunnelClient) UDPRevecive

func (s *TunnelClient) UDPRevecive(key, ID string)

type TunnelClientArgs

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

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) UDPGCDeamon

func (s *TunnelServer) UDPGCDeamon()

func (*TunnelServer) UDPRevecive

func (s *TunnelServer) UDPRevecive(key, ID string)

func (*TunnelServer) UDPSend

func (s *TunnelServer) UDPSend(data []byte, localAddr, srcAddr *net.UDPAddr)

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
	Jumper    *string
}

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) 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 TunnelUDPConnItem

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

type TunnelUDPPacketItem

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

Jump to

Keyboard shortcuts

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