helper

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLinks(network net.Network, userLevel uint32, policy i.BufferPolicy) (*pipe.Link, *pipe.Link)

func Relay

func Relay(ctx context.Context, leftReader buf.Reader, leftWriter buf.Writer,
	rightReader buf.Reader, rightWriter buf.Writer) error

read from leftReader, write to rightWriter, read from rightReader, write to leftWriter. When any direction met an error, returns the error. When both directions return nil, the function returns nil.

func RelayConn

func RelayConn(ctx context.Context, left, right net.Conn) error

read from leftReader, write to rightWriter, read from rightReader, write to leftWriter. When any direction met an error, returns the error. When both directions return nil, the function returns nil.

func RelayUDPPacketConn

func RelayUDPPacketConn(ctx context.Context, left udp.PacketReaderWriter, right udp.PacketReaderWriter) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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