Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ChannelHTTP is a custom channel type for forwarding HTTP requests. // The server opens this channel toward the client for each incoming request. ChannelHTTP = "gatecrash-http" // ChannelDirectTCPIP is the standard SSH direct-tcpip channel (RFC 4254 Section 7.2). // Used for raw TCP port forwarding. ChannelDirectTCPIP = "direct-tcpip" // ChannelControl is a long-lived channel for heartbeat and metadata exchange. // Opened by the client immediately after SSH connection. ChannelControl = "gatecrash-control" // ChannelDiagnostic is opened by the server toward the client to run // latency and throughput diagnostics on the tunnel link itself. ChannelDiagnostic = "gatecrash-diagnostic" )
SSH channel type constants.
View Source
const ( ControlHeartbeat = "heartbeat" ControlClientInfo = "client_info" ControlUpdateAvailable = "update_available" )
Control message types.
View Source
const ( DiagPing = "ping" DiagPong = "pong" DiagDownload = "download" // server tells client to read N bytes of payload DiagUpload = "upload" // server tells client to send N bytes of payload DiagResult = "result" // client confirms completion )
Diagnostic message types exchanged over ChannelDiagnostic as length-prefixed JSON.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientInfo ¶
type ClientInfo struct {
Version string `json:"version"`
OS string `json:"os"`
Arch string `json:"arch"`
Hostname string `json:"hostname"`
}
ClientInfo is sent by the client on the control channel after connecting.
type ControlMessage ¶
type ControlMessage struct {
Type string `json:"type"`
Data json.RawMessage `json:"data,omitempty"`
}
ControlMessage is exchanged over the control channel as JSON with a 4-byte length prefix.
type DiagMessage ¶ added in v0.8.9
type DiagMessage struct {
Type string `json:"type"`
Size int `json:"size,omitempty"` // payload size for download/upload
Seq int `json:"seq,omitempty"` // sequence number for ping/pong
}
DiagMessage is a single diagnostic command/response.
type DirectTCPIPData ¶
DirectTCPIPData is the standard SSH direct-tcpip extra data (RFC 4254).
Click to show internal directories.
Click to hide internal directories.