handler

package
v0.0.0-...-00fd355 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Clients      = make(map[string]*xwebsocket.Conn)
	OptionAgents = make(map[string]*agent.Agent)
)

Functions

func AddAgent

func AddAgent(hostTag, clientId string, ws *xwebsocket.Conn)

func AgentOption

func AgentOption(w http.ResponseWriter, r *http.Request)

func CheckConnection

func CheckConnection(w http.ResponseWriter, r *http.Request)

func CheckConnections

func CheckConnections(w http.ResponseWriter, r *http.Request)

func HandleAttach

func HandleAttach(wsAttach *xwebsocket.Conn)

func HandleAttachV2

func HandleAttachV2(w http.ResponseWriter, r *http.Request)

Client 连接处理函数

func HandleTerminalWS

func HandleTerminalWS(w http.ResponseWriter, r *http.Request)

func HandleWebSocket

func HandleWebSocket(ws *xwebsocket.Conn)

func HandleWebSocketV2

func HandleWebSocketV2(w http.ResponseWriter, r *http.Request)

func IndexHelper

func IndexHelper(w http.ResponseWriter, r *http.Request)

func ListAgents

func ListAgents(w http.ResponseWriter, r *http.Request)

func Login

func Login(w http.ResponseWriter, r *http.Request)

func RemoveAgent

func RemoveAgent(hostTag, clientId string)

func ServeIndexPage

func ServeIndexPage(w http.ResponseWriter, r *http.Request)

func ServeLoginPage

func ServeLoginPage(w http.ResponseWriter, r *http.Request)

func ServeTerminal

func ServeTerminal(w http.ResponseWriter, r *http.Request)

func StableVersion

func StableVersion(w http.ResponseWriter, r *http.Request)

Types

type TerminalMessage

type TerminalMessage struct {
	Type string `json:"type"`
	Rows int    `json:"rows,omitempty"`
	Cols int    `json:"cols,omitempty"`
	Data string `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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