proxy

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FirstPayloadTimeout = 10 * time.Millisecond

Variables

View Source
var ErrUDPNotSupport = errors.New("udp is not supported")

Functions

func ContextWithUser

func ContextWithUser(ctx context.Context, user string) context.Context

func UserFromContext

func UserFromContext(ctx context.Context) (string, bool)

Types

type CustomConn

type CustomConn struct {
	net.Conn
	io.Writer
	io.Reader
	// contains filtered or unexported fields
}

func NewProxyConn

func NewProxyConn(customConn CustomConnOption) *CustomConn

func (*CustomConn) Close

func (c *CustomConn) Close() error

func (*CustomConn) CloseWrite

func (c *CustomConn) CloseWrite() error

func (*CustomConn) NetConn

func (c *CustomConn) NetConn() net.Conn

func (*CustomConn) Read

func (c *CustomConn) Read(b []byte) (int, error)

func (*CustomConn) Write

func (c *CustomConn) Write(b []byte) (int, error)

type CustomConnOption

type CustomConnOption struct {
	Conn       net.Conn
	Writer     io.Writer
	Reader     io.Reader
	CloseWrite func()
	Close      func()
}

type FlowConn

type FlowConn struct {
	buf.Reader
	buf.Writer
	i.ReadDeadline
	// contains filtered or unexported fields
}

func NewFlowConn

func NewFlowConn(flowConnOption FlowConnOption) *FlowConn

func (*FlowConn) Close

func (c *FlowConn) Close() error

func (*FlowConn) CloseWrite

func (c *FlowConn) CloseWrite() error

func (*FlowConn) OkayToUnwrapReader

func (c *FlowConn) OkayToUnwrapReader() int

func (*FlowConn) OkayToUnwrapWriter

func (c *FlowConn) OkayToUnwrapWriter() int

func (*FlowConn) UnwrapReader

func (c *FlowConn) UnwrapReader() any

func (*FlowConn) UnwrapWriter

func (c *FlowConn) UnwrapWriter() any

type FlowConnOption

type FlowConnOption struct {
	Reader      buf.Reader
	Writer      buf.Writer
	Close       func() error
	CloseWrite  func() error
	SetDeadline i.ReadDeadline
}

type NetConnPacketConn

type NetConnPacketConn struct {
	net.Conn
	udp.ReadFromer
	udp.WriteToer
}

func NewNetConnPacketConn

func NewNetConnPacketConn(conn net.Conn, readFromer udp.ReadFromer, writeToer udp.WriteToer) *NetConnPacketConn

type ProxyCtxKey

type ProxyCtxKey int

Directories

Path Synopsis
Package proxy contains all proxies used by Xray.
Package proxy contains all proxies used by Xray.
Package vmess contains the implementation of VMess protocol and transportation.
Package vmess contains the implementation of VMess protocol and transportation.

Jump to

Keyboard shortcuts

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