Documentation
¶
Index ¶
- Constants
- Variables
- func ByteContains(x, y []byte) bool
- type HostStatusRequest
- type Request
- type SSHSession
- type VNCForward
- type WSConnect
- func (w *WSConnect) Close() error
- func (w *WSConnect) HandlerFTaskStatus(conn *websocket.Conn, msg *WsMsg)
- func (w *WSConnect) HandlerHostStatus(conn *websocket.Conn, msg *WsMsg)
- func (w *WSConnect) HandlerResize(conn *websocket.Conn, msg *WsMsg)
- func (w *WSConnect) HandlerSSHShell(conn *websocket.Conn, msg *WsMsg)
- func (w *WSConnect) InitHandlers() *WSConnect
- func (w *WSConnect) Serve()
- func (w *WSConnect) WriteMsg(msg interface{})
- type WebService
- type WsHandler
- type WsMsg
Constants ¶
View Source
const ( EventCancel = "cancel" EventConnect = "connect" )
View Source
const ( WSStatusSuccess = "0" WSStatusError = "-1" DefaultStatusInterval = 2 * time.Second )
Variables ¶
View Source
var ( // ZModemSZStart = []byte{13, 42, 42, 24, 66, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 13, 138, 17} ZModemSZStart = []byte{42, 42, 24, 66, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 13, 138, 17} // ZModemSZEnd = []byte{13, 42, 42, 24, 66, 48, 56, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 50, 100, 13, 138} ZModemSZEnd = []byte{42, 42, 24, 66, 48, 56, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 50, 100, 13, 138} ZModemSZEndOO = []byte{79, 79} ZModemRZStart = []byte{42, 42, 24, 66, 48, 49, 48, 48, 48, 48, 48, 48, 50, 51, 98, 101, 53, 48, 13, 138, 17} ZModemRZEStart = []byte{42, 42, 24, 66, 48, 49, 48, 48, 48, 48, 48, 48, 54, 51, 102, 54, 57, 52, 13, 138, 17} ZModemRZSStart = []byte{42, 42, 24, 66, 48, 49, 48, 48, 48, 48, 48, 50, 50, 51, 100, 56, 51, 50, 13, 138, 17} ZModemRZESStart = []byte{42, 42, 24, 66, 48, 49, 48, 48, 48, 48, 48, 50, 54, 51, 57, 48, 102, 54, 13, 138, 17} ZModemRZEnd = []byte{42, 42, 24, 66, 48, 56, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 50, 100, 13, 138} ZModemRZCtrlStart = []byte{42, 42, 24, 66, 48} ZModemRZCtrlEnd1 = []byte{13, 138, 17} ZModemRZCtrlEnd2 = []byte{13, 138} ZModemCancel = []byte{24, 24, 24, 24, 24, 8, 8, 8, 8, 8} )
Functions ¶
func ByteContains ¶ added in v0.7.9
Types ¶
type HostStatusRequest ¶
type SSHSession ¶
type SSHSession struct { *transport.Session ZModemSZ, ZModemRZ, ZModemSZOO bool // contains filtered or unexported fields }
SSHSession connect to ssh server using ssh session.
func NewSshConn ¶
func NewSshConn(cols, rows int, sshClient *transport.Client) (*SSHSession, error)
func (*SSHSession) Close ¶
func (s *SSHSession) Close()
func (*SSHSession) ReceiveWsMsg ¶
func (s *SSHSession) ReceiveWsMsg(wsConn *websocket.Conn, exitCh chan struct{})
ReceiveWsMsg receive websocket msg do some handling then write into ssh.session.stdin
func (*SSHSession) SendComboOutput ¶
func (s *SSHSession) SendComboOutput(wsConn *websocket.Conn, exitCh chan struct{})
func (*SSHSession) SessionWait ¶
func (s *SSHSession) SessionWait(quitChan chan struct{})
type VNCForward ¶
type VNCForward struct {
// contains filtered or unexported fields
}
func NewVNCForward ¶
func (*VNCForward) Close ¶
func (vf *VNCForward) Close()
func (*VNCForward) Serve ¶
func (vf *VNCForward) Serve()
type WSConnect ¶
func NewWSConnect ¶
func NewWSConnect(conn *websocket.Conn, engine WebService) *WSConnect
func (*WSConnect) HandlerFTaskStatus ¶
func (*WSConnect) HandlerHostStatus ¶
func (*WSConnect) HandlerResize ¶
func (*WSConnect) HandlerSSHShell ¶
func (*WSConnect) InitHandlers ¶
type WebService ¶
Click to show internal directories.
Click to hide internal directories.