relay

package
v0.70.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HalfOpen

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

HalfOpen forwards TCP connections until Blackhole is called. A blackholed pair stops forwarding but deliberately retains the upstream socket so the peer sees a real half-open connection until the relay is closed.

func New

func New(upstreamAddr string) *HalfOpen

func (*HalfOpen) BindAddr

func (r *HalfOpen) BindAddr() string

func (*HalfOpen) BindPort

func (r *HalfOpen) BindPort() int

func (*HalfOpen) Blackhole

func (r *HalfOpen) Blackhole(index int) error

Blackhole uses a one-based connection index in accept order.

func (*HalfOpen) Close

func (r *HalfOpen) Close() error

func (*HalfOpen) Run

func (r *HalfOpen) Run() error

func (*HalfOpen) WaitForConnections

func (r *HalfOpen) WaitForConnections(count int, timeout time.Duration) error

Jump to

Keyboard shortcuts

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