mirror

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements an HTTP mirror server for Wireshark analysis

func NewServer

func NewServer(port int, logger logger.Logger) *Server

NewServer creates a new HTTP mirror server

func (*Server) GetPort

func (s *Server) GetPort() int

GetPort returns the port the mirror server is listening on

func (*Server) MirrorTraffic

func (s *Server) MirrorTraffic(originalHost, method, url, requestBody, responseBody string, statusCode int, headers http.Header)

MirrorTraffic mirrors an HTTP exchange for Wireshark analysis

func (*Server) Start

func (s *Server) Start() error

Start starts the HTTP mirror server

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the HTTP mirror server

type TrafficRecord

type TrafficRecord struct {
	ID           uint64
	Timestamp    time.Time
	OriginalHost string
	Method       string
	URL          string
	RequestBody  string
	ResponseBody string
	StatusCode   int
	Headers      http.Header
}

TrafficRecord represents a mirrored HTTP exchange

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL