feature: Adds basic data command support.
This commit is contained in:
parent
ede4d528aa
commit
17e1491f96
14 changed files with 2241 additions and 195 deletions
103
backend/sshappbackend/datacommands/constants.go
Normal file
103
backend/sshappbackend/datacommands/constants.go
Normal file
|
@ -0,0 +1,103 @@
|
|||
package datacommands
|
||||
|
||||
type ProxyStatusRequest struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
}
|
||||
|
||||
type ProxyStatusResponse struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
IsActive bool
|
||||
}
|
||||
|
||||
type RemoveProxy struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
}
|
||||
|
||||
type ProxyInstanceResponse struct {
|
||||
Type string
|
||||
Proxies []uint16
|
||||
}
|
||||
|
||||
type ProxyConnectionsRequest struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
}
|
||||
|
||||
type ProxyConnectionsResponse struct {
|
||||
Type string
|
||||
Connections []uint16
|
||||
}
|
||||
|
||||
type TCPConnectionOpened struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
ConnectionID uint16
|
||||
}
|
||||
|
||||
type TCPConnectionClosed struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
ConnectionID uint16
|
||||
}
|
||||
|
||||
type TCPProxyData struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
ConnectionID uint16
|
||||
DataLength uint16
|
||||
}
|
||||
|
||||
type UDPProxyData struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
ClientIP string
|
||||
ClientPort uint16
|
||||
DataLength uint16
|
||||
}
|
||||
|
||||
type ProxyInformationRequest struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
}
|
||||
|
||||
type ProxyInformationResponse struct {
|
||||
Type string
|
||||
Exists bool
|
||||
SourceIP string
|
||||
SourcePort uint16
|
||||
DestPort uint16
|
||||
Protocol string // Will be either 'tcp' or 'udp'
|
||||
}
|
||||
|
||||
type ProxyConnectionInformationRequest struct {
|
||||
Type string
|
||||
ProxyID uint16
|
||||
ConnectionID uint16
|
||||
}
|
||||
|
||||
type ProxyConnectionInformationResponse struct {
|
||||
Type string
|
||||
Exists bool
|
||||
ClientIP string
|
||||
ClientPort uint16
|
||||
}
|
||||
|
||||
const (
|
||||
ProxyStatusRequestID = iota + 100
|
||||
ProxyStatusResponseID
|
||||
RemoveProxyID
|
||||
ProxyInstanceResponseID
|
||||
ProxyConnectionsRequestID
|
||||
ProxyConnectionsResponseID
|
||||
TCPConnectionOpenedID
|
||||
TCPConnectionClosedID
|
||||
TCPProxyDataID
|
||||
UDPProxyDataID
|
||||
ProxyInformationRequestID
|
||||
ProxyInformationResponseID
|
||||
ProxyConnectionInformationRequestID
|
||||
ProxyConnectionInformationResponseID
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue