Documentation ¶
Index ¶
- Constants
- type ConnectRequestPacket
- type ConnectResponsePacket
- type Envelope
- type HostPingRequestPacket
- type HostPingResponsePacket
- type InfoReplyPacket
- type InfoRequestPacket
- type LigoloDecoder
- type LigoloEncoder
- type LigoloEncoderDecoder
- type ListenerBindPacket
- type ListenerBindReponse
- type ListenerCloseRequestPacket
- type ListenerCloseResponsePacket
- type ListenerRequestPacket
- type ListenerResponsePacket
- type ListenerSockRequestPacket
- type ListenerSockResponsePacket
- type ListenerUDPPacket
- type NetInterface
Constants ¶
const ( MessageInfoRequest = uint8(iota) MessageInfoReply MessageConnectRequest MessageConnectResponse MessageHostPingRequest MessageHostPingResponse MessageListenerRequest // Start a listener MessageListenerResponse MessageListenerBindRequest // Bind to a listener MessageListenerBindResponse MessageListenerSockRequest // Bind to a socket MessageListenerSockResponse MessageListenerCloseRequest MessageListenerCloseResponse MessageClose )
const ( TransportTCP = uint8(iota) TransportUDP )
const ( Networkv4 = uint8(iota) Networkv6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectRequestPacket ¶
ConnectRequestPacket is sent by the proxy to request a new TCP/UDP connection
type ConnectResponsePacket ¶
ConnectResponsePacket is the response to the ConnectRequestPacket and indicate if the connection can be established, and if a RST packet need to be sent
type HostPingRequestPacket ¶
type HostPingRequestPacket struct {
Address string
}
HostPingRequestPacket is used when a ICMP packet is received on the proxy server. It is used to request a ping request to the agent
type HostPingResponsePacket ¶
type HostPingResponsePacket struct {
Alive bool
}
HostPingResponsePacket is sent by the agent to indicate the requested host status
type InfoReplyPacket ¶
type InfoReplyPacket struct { Name string Interfaces []NetInterface SessionID string }
InfoReplyPacket contains the Name of the agent and the network interfaces configuration
type InfoRequestPacket ¶
type InfoRequestPacket struct { }
InfoRequestPacket is sent by the proxy to discover the agent information
type LigoloDecoder ¶
type LigoloDecoder struct { Envelope Envelope // contains filtered or unexported fields }
LigoloDecoder is the struct containing the decoded Envelope and the reader
func NewDecoder ¶
func NewDecoder(reader io.Reader) LigoloDecoder
NewDecoder decode Ligolo-ng packets
func (*LigoloDecoder) Decode ¶
func (d *LigoloDecoder) Decode() error
Decode read content from the reader and fill the Envelope
type LigoloEncoder ¶
type LigoloEncoder struct {
// contains filtered or unexported fields
}
LigoloEncoder is the structure containing the writer used when encoding Envelopes
func NewEncoder ¶
func NewEncoder(writer io.Writer) LigoloEncoder
NewEncoder encode Ligolo-ng packets
func (*LigoloEncoder) Encode ¶
func (e *LigoloEncoder) Encode(envelope Envelope) error
Encode an Envelope packet and write the result into the writer
type LigoloEncoderDecoder ¶ added in v0.5.1
type LigoloEncoderDecoder struct { LigoloDecoder LigoloEncoder }
func NewEncoderDecoder ¶ added in v0.5.1
func NewEncoderDecoder(rw io.ReadWriter) LigoloEncoderDecoder
type ListenerBindPacket ¶
type ListenerBindPacket struct {
ListenerID int32
}
ListenerBindPacket is used by the proxy to Bind to a ListenerID, waiting for connections.
type ListenerBindReponse ¶
ListenerBindReponse is returned when listener sockets are ready to be relayed from the agent to the proxy.
type ListenerCloseRequestPacket ¶
type ListenerCloseRequestPacket struct {
ListenerID int32
}
ListenerCloseRequestPacket is the packet sent when closing Listeners
type ListenerCloseResponsePacket ¶
ListenerCloseResponsePacket is the response to ListenerCloseRequestPacket
type ListenerRequestPacket ¶
ListenerRequestPacket is used when a new listener socket is created by the proxy.
type ListenerResponsePacket ¶
ListenerResponsePacket is used to indicate if the Listener was created, and send the ListenerID.
type ListenerSockRequestPacket ¶
type ListenerSockRequestPacket struct {
SockID int32
}
ListenerSockRequestPacket is used by the proxy when relaying a listener socket
type ListenerSockResponsePacket ¶
ListenerSockRequestPacket is the response to ListenerSockRequestPacket
type NetInterface ¶
type NetInterface struct { Index int // positive integer that starts at one, zero is never used MTU int // maximum transmission unit Name string // e.g., "en0", "lo0", "eth0.100" HardwareAddr net.HardwareAddr // IEEE MAC-48, EUI-48 and EUI-64 form Flags net.Flags // e.g., FlagUp, FlagLoopback, FlagMulticast Addresses []string }
NetInterface is the structure containing the agent network informations
func NewNetInterfaces ¶
func NewNetInterfaces(netif []net.Interface) (out []NetInterface)
NewNetInterfaces converts a net.Interface slice to a NetInterface slice that can be transmitted over Gob