mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-01-14 20:05:15 +00:00
* Tap outgoing: If --anydirection flag is passed with HOST_MODE, tap by source IP. * Moved ConnectionInfo from http_matcher to http_reader. * Generalized shouldTap in stream factory to get more properties. * tap reports IsOutgoing property of tcp connection. * gofmt. * CLI instructs tapper to tap outgoing connections. * API saves IsOutgoing to DB and passes it to UI. * Add a visual marker in the HAR list for outgoing messages. * Fixed: Swapped src and dst. * Resolver keeps a list of all ClusterIP services. * Do not save HARs with destination ClusterIP services. * CLI accepts flag that controls traffic direction. * Indicate incoming/outgoing with icon instead of with border color. * Fixed: Didn't filter messages to services in aggregator. * Clearer syntax around the direction icon. Added title text. * Fixed width around direction icon. * Less repetition. * Removed TODO. * Renamed incoming -> ingoing. * More verbose title text to image. * Switched routine order for readability.
40 lines
986 B
Go
40 lines
986 B
Go
package shared
|
|
|
|
type WebSocketMessageType string
|
|
const (
|
|
WebSocketMessageTypeEntry WebSocketMessageType = "entry"
|
|
WebSocketMessageTypeTappedEntry WebSocketMessageType = "tappedEntry"
|
|
WebSocketMessageTypeUpdateStatus WebSocketMessageType = "status"
|
|
)
|
|
|
|
type WebSocketMessageMetadata struct {
|
|
MessageType WebSocketMessageType `json:"messageType,omitempty"`
|
|
}
|
|
|
|
type WebSocketStatusMessage struct {
|
|
*WebSocketMessageMetadata
|
|
TappingStatus TapStatus `json:"tappingStatus"`
|
|
}
|
|
|
|
type TapStatus struct {
|
|
Pods []PodInfo `json:"pods"`
|
|
}
|
|
|
|
type PodInfo struct {
|
|
Namespace string `json:"namespace"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
func CreateWebSocketStatusMessage(tappingStatus TapStatus) WebSocketStatusMessage {
|
|
return WebSocketStatusMessage{
|
|
WebSocketMessageMetadata: &WebSocketMessageMetadata{
|
|
MessageType: WebSocketMessageTypeUpdateStatus,
|
|
},
|
|
TappingStatus: tappingStatus,
|
|
}
|
|
}
|
|
|
|
type TrafficFilteringOptions struct {
|
|
PlainTextMaskingRegexes []*SerializableRegexp
|
|
}
|