tuic

package
v0.0.0-...-17b02d1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QUIC   = common.QUIC
	NATIVE = common.NATIVE
)
View Source
const DefaultConnectionReceiveWindow = common.DefaultConnectionReceiveWindow
View Source
const DefaultStreamReceiveWindow = common.DefaultStreamReceiveWindow

Variables

View Source
var GenTKN = v4.GenTKN
View Source
var MaxFragSizeV5 = v5.MaxFragSize
View Source
var PacketOverHeadV4 = v4.PacketOverHead
View Source
var PacketOverHeadV5 = v5.PacketOverHead
View Source
var TooManyOpenStreams = common.TooManyOpenStreams

Functions

This section is empty.

Types

type Client

type Client = common.Client

func NewClientV4

func NewClientV4(clientOption *ClientOptionV4, udp bool, dialerRef C.Dialer) Client

func NewClientV5

func NewClientV5(clientOption *ClientOptionV5, udp bool, dialerRef C.Dialer) Client

type ClientOptionV4

type ClientOptionV4 = v4.ClientOption

type ClientOptionV5

type ClientOptionV5 = v5.ClientOption

type DialFunc

type DialFunc = common.DialFunc

type PoolClient

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

func NewPoolClientV4

func NewPoolClientV4(clientOption *ClientOptionV4) *PoolClient

func NewPoolClientV5

func NewPoolClientV5(clientOption *ClientOptionV5) *PoolClient

func (*PoolClient) DialContextWithDialer

func (t *PoolClient) DialContextWithDialer(ctx context.Context, metadata *C.Metadata, dialer C.Dialer, dialFn DialFunc) (net.Conn, error)

func (*PoolClient) ListenPacketWithDialer

func (t *PoolClient) ListenPacketWithDialer(ctx context.Context, metadata *C.Metadata, dialer C.Dialer, dialFn DialFunc) (net.PacketConn, error)

type Server

type Server struct {
	*ServerOption
	// contains filtered or unexported fields
}

func NewServer

func NewServer(option *ServerOption, pc net.PacketConn) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Serve

func (s *Server) Serve() error

type ServerOption

type ServerOption struct {
	HandleTcpFn func(conn net.Conn, addr socks5.Addr, additions ...inbound.Addition) error
	HandleUdpFn func(addr socks5.Addr, packet C.UDPPacket, additions ...inbound.Addition) error

	TlsConfig             *tls.Config
	QuicConfig            *quic.Config
	Tokens                [][32]byte          // V4 special
	Users                 map[[16]byte]string // V5 special
	CongestionController  string
	AuthenticationTimeout time.Duration
	MaxUdpRelayPacketSize int
	CWND                  int
}

type UdpRelayMode

type UdpRelayMode = common.UdpRelayMode

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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