feature: Adds basic data command support.

This commit is contained in:
Tera << 8 2025-02-16 15:02:50 -05:00
parent ede4d528aa
commit 17e1491f96
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
14 changed files with 2241 additions and 195 deletions

View 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
)