forward

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildProxyHeader

func BuildProxyHeader(info ProxyInfo) ([]byte, error)

func StartTCPForwarder

func StartTCPForwarder(ctx context.Context, listenAddress string, targetAddress string) (string, func(), error)

func StartUDPForwarder

func StartUDPForwarder(ctx context.Context, listenAddress string, targetAddress string) (string, func(), error)

Types

type Metrics

type Metrics struct {
	TCPConnections      int64
	TCPConnectionEvents int64
	UDPPackets          int64
	UploadBytes         int64
	DownloadBytes       int64
}

type ProxyInfo

type ProxyInfo struct {
	Version         ProxyProtocolVersion
	SourceIP        net.IP
	DestinationIP   net.IP
	SourcePort      int
	DestinationPort int
}

func ParseProxyHeader

func ParseProxyHeader(data []byte) (ProxyInfo, []byte, error)

type ProxyProtocolVersion

type ProxyProtocolVersion int
const (
	ProxyProtocolNone ProxyProtocolVersion = iota
	ProxyProtocolV1
	ProxyProtocolV2
)

type Supervisor

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

func NewSupervisor

func NewSupervisor() *Supervisor

func (*Supervisor) AgentMetrics

func (supervisor *Supervisor) AgentMetrics() agent.MetricsPayload

func (*Supervisor) Apply

func (supervisor *Supervisor) Apply(ctx context.Context, snapshot agent.ConfigSnapshot) error

func (*Supervisor) Close

func (supervisor *Supervisor) Close()

func (*Supervisor) Metrics

func (supervisor *Supervisor) Metrics() Metrics

Jump to

Keyboard shortcuts

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