dispather

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const TIMEOUT = 5

Variables

View Source
var (
	Commands = []string{"CONNECT", "BIND", "UDP ASSOCIATE"}
	AddrType = []string{"", "IPv4", "", "Domain", "IPv6"}
	Conns    = make([]net.Conn, 0)
	Verbose  = false
)
View Source
var ERR_FILE_EXISTS = errors.New("remote file already exists")
View Source
var ERR_FILE_NOT_EXISTS = errors.New("remote file not exists")
View Source
var ERR_PROTOCOL_SEPARATOR = errors.New("unknown separator")
View Source
var ERR_TARGET_NODE = errors.New("can not find target node")
View Source
var ERR_UNKNOWN_CMD = errors.New("unknown command type")

Functions

func AgentClient

func AgentClient(conn net.Conn)

AgentClient Admin节点作为Client

func AgentHandShake

func AgentHandShake(peerNode *node.Node, currentSessionID uint16) (err error)

func AgentParseTarget

func AgentParseTarget(peerNode *node.Node, currentSessionID uint16) (host string, err error)

func AgentServer

func AgentServer(conn net.Conn)

AgentServer Admin节点作为Server

func CopyNode2StdinPipe

func CopyNode2StdinPipe(input *node.Node, output io.Writer, c chan bool, cmd *exec.Cmd)

func CopyStdoutPipe2Node

func CopyStdoutPipe2Node(input io.Reader, output *node.Node, c chan bool)

func InitAgentHandler

func InitAgentHandler()

InitAgentHandler Agent处理Admin发出的命令

func PipeWhenClose

func PipeWhenClose(peerNode *node.Node, currentSessionID uint16, target string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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