xudp

package
v0.0.0-...-3a6f846 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvShow    = "XRAY_XUDP_SHOW"
	EnvBaseKey = "XRAY_XUDP_BASEKEY"
)

Variables

View Source
var (
	Show    bool
	BaseKey []byte
)

Functions

func GetGlobalID

func GetGlobalID(ctx context.Context) (globalID [8]byte)

Types

type PacketReader

type PacketReader struct {
	Reader io.Reader
	// contains filtered or unexported fields
}

func NewPacketReader

func NewPacketReader(reader io.Reader) *PacketReader

func (*PacketReader) ReadMultiBuffer

func (r *PacketReader) ReadMultiBuffer() (buf.MultiBuffer, error)

type PacketWriter

type PacketWriter struct {
	Writer   buf.Writer
	Dest     net.Destination
	GlobalID [8]byte
}

func NewPacketWriter

func NewPacketWriter(writer buf.Writer, dest net.Destination, globalID [8]byte) *PacketWriter

func (*PacketWriter) WriteMultiBuffer

func (w *PacketWriter) WriteMultiBuffer(mb buf.MultiBuffer) error

Jump to

Keyboard shortcuts

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