segaro

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrivateField

func GetPrivateField(v interface{}, fieldName string) (interface{}, error)

GetPrivateField, returns the private fieldName from v object

func GetRealityServerConfig

func GetRealityServerConfig(conn *net.Conn) (config *goReality.Config, err error)

GetRealityServerConfig, returns the server config, (tcp, h2, grpc supported)

func SegaroRead

func SegaroRead(reader buf.Reader, writer buf.Writer, timer *signal.ActivityTimer, conn net.Conn, trafficState *proxy.TrafficState, fromInbound bool, segaroConfig *SegaroConfig, xsvCanContinue chan bool) error

SegaroRead filter and read xtls-segaro-vision

func SegaroRemovePadding

func SegaroRemovePadding(chunks buf.MultiBuffer, paddingSize, subChunkSize int) *buf.Buffer

func SegaroWrite

func SegaroWrite(reader buf.Reader, writer buf.Writer, timer signal.ActivityUpdater, conn net.Conn, fromInbound bool, segaroConfig *SegaroConfig, xsvCanContinue chan bool) error

SegaroWrite filter and write xtls-segaro-vision

Types

type SegaroConfig

type SegaroConfig struct {
	RealityConfig   *reality.Config
	GoRealityConfig *goReality.Config
}

func (*SegaroConfig) GetClientRandPacketCount

func (sc *SegaroConfig) GetClientRandPacketCount() (int, int)

func (*SegaroConfig) GetClientRandPacketSize

func (sc *SegaroConfig) GetClientRandPacketSize() (int, int)

func (*SegaroConfig) GetPaddingSize

func (sc *SegaroConfig) GetPaddingSize() uint32

func (*SegaroConfig) GetServerRandPacketCount

func (sc *SegaroConfig) GetServerRandPacketCount() (int, int)

func (*SegaroConfig) GetServerRandPacketSize

func (sc *SegaroConfig) GetServerRandPacketSize() (int, int)

func (*SegaroConfig) GetSplitSize

func (sc *SegaroConfig) GetSplitSize() (int, int)

func (*SegaroConfig) GetSubChunkSize

func (sc *SegaroConfig) GetSubChunkSize() uint32

type SegaroReader

type SegaroReader struct {
	buf.Reader
	// contains filtered or unexported fields
}

SegaroReader is used to read xtls-segaro-vision

func NewSegaroReader

func NewSegaroReader(reader buf.Reader, state *proxy.TrafficState) *SegaroReader

func (*SegaroReader) ReadMultiBuffer

func (w *SegaroReader) ReadMultiBuffer() (buf.MultiBuffer, error)

type SegaroWriter

type SegaroWriter struct {
	buf.Writer
	// contains filtered or unexported fields
}

SegaroWriter is used to write xtls-segaro-vision

func NewSegaroWriter

func NewSegaroWriter(writer buf.Writer, state *proxy.TrafficState, segaroConfig *SegaroConfig, conn net.Conn) *SegaroWriter

func (*SegaroWriter) WriteMultiBuffer

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

Jump to

Keyboard shortcuts

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