Documentation
¶
Overview ¶
Package wsrepeater opens a fresh WebSocket connection to a target, sends one message, and captures the frames the server returns — a "Repeater" for WebSockets. It speaks enough of RFC 6455 to do this with no external deps: the client handshake, masked client frames, and frame reading. TLS verification is skipped (wss), matching how Interseptor talks to targets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct {
Dir string `json:"dir"` // "send" | "recv"
Opcode int `json:"opcode"`
Text string `json:"text"`
Len int `json:"len"`
}
Frame is one sent or received WebSocket frame.
type Request ¶
type Request struct {
URL string // ws:// wss:// (http/https also accepted)
Message string // payload to send
Binary bool // send a binary frame instead of text
Headers map[string]string // extra handshake headers (Cookie, Authorization, …)
ReadFor time.Duration // how long to collect response frames (default 2s)
}
Request is one WebSocket send.
Click to show internal directories.
Click to hide internal directories.