server

package
v0.0.0-...-6410feb Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ON_CONNECTION    = "connection"
	ON_DISCONNECTION = "disconnection"
	ON_ERROR         = "error"

	DISCONNECT_EVENT = "disconnect"
	OUTPUT_EVENT     = "output"
	INPUT_EVENT      = "input"
	RESIZE_EVENT     = "resize"

	COMMAND_QUERY = "command"
	ARGS_QUERY    = "args"
)
View Source
const (
	BINARY_PROTOL = "binary"
	BASE64_PROTOL = "base64"
)
View Source
const (
	SESSION_ID = "<session-id>"
)

Variables

This section is empty.

Functions

func HandleSftpDownload

func HandleSftpDownload(ctx context.Context, w http.ResponseWriter, r *http.Request)

func HandleSftpList

func HandleSftpList(ctx context.Context, w http.ResponseWriter, r *http.Request)

func HandleSftpUpload

func HandleSftpUpload(ctx context.Context, w http.ResponseWriter, r *http.Request)

Types

type ConnectionServer

type ConnectionServer struct {
}

func NewConnectionServer

func NewConnectionServer() *ConnectionServer

func (*ConnectionServer) ServeHTTP

func (s *ConnectionServer) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Files

type Files []sFileList

func (Files) Len

func (files Files) Len() int

func (Files) Less

func (files Files) Less(i, j int) bool

func (Files) Swap

func (files Files) Swap(i, j int)

type RDPServer

type RDPServer struct {
	Session *session.SSession

	Host         string
	Port         int
	Username     string
	Password     string
	ConnectionId string

	Width  int
	Height int
	Dpi    int
}

func NewRDPServer

func NewRDPServer(s *session.SSession) (*RDPServer, error)

func (*RDPServer) ServeHTTP

func (s *RDPServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TTYServer

type TTYServer struct {
	*socketio.Server
}

func NewTTYServer

func NewTTYServer(s *session.SSession) (*TTYServer, error)

type WebSocketBufferWriter

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

func (*WebSocketBufferWriter) Write

func (w *WebSocketBufferWriter) Write(p []byte) (int, error)

type WebsocketProxyServer

type WebsocketProxyServer struct {
	Session *session.SSession
	// contains filtered or unexported fields
}

func NewWebsocketProxyServer

func NewWebsocketProxyServer(s *session.SSession) (*WebsocketProxyServer, error)

func (*WebsocketProxyServer) ServeHTTP

func (s *WebsocketProxyServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WebsocketServer

type WebsocketServer struct {
	Session    *session.SSession
	Host       string
	Port       int
	Username   string
	Password   string
	PrivateKey string

	StdinPipe io.WriteCloser
	// contains filtered or unexported fields
}

func NewSshServer

func NewSshServer(s *session.SSession) (*WebsocketServer, error)

func (*WebsocketServer) ServeHTTP

func (s *WebsocketServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type WebsockifyServer

type WebsockifyServer struct {
	Session    *session.SSession
	TargetHost string
	TargetPort int64
}

func NewWebsockifyServer

func NewWebsockifyServer(s *session.SSession) (*WebsockifyServer, error)

func (*WebsockifyServer) ReadFromWs

func (s *WebsockifyServer) ReadFromWs(wsConn *websocket.Conn) ([]byte, error)

func (*WebsockifyServer) ServeHTTP

func (s *WebsockifyServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*WebsockifyServer) WriteToWs

func (s *WebsockifyServer) WriteToWs(wsConn *websocket.Conn, data []byte) error

Jump to

Keyboard shortcuts

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