Versions in this module Expand all Collapse all v0 v0.2.2 Mar 1, 2024 v0.2.1 Mar 1, 2024 v0.2.0 Feb 29, 2024 Changes in this version + const DefaultALPN + const DefaultConnReceiveWindow + const DefaultKeepAlivePeriod + const DefaultMaxIdleTimeout + const DefaultStreamReceiveWindow + const ErrorCodeAuthError + const ErrorCodeGeneric + const ErrorCodeProtocolError + const MbpsToBps + const MinSpeedBPS + const ProtocolTimeout + const ProtocolVersion + func NewXPlusPacketConn(conn net.PacketConn, key []byte, disableVectorised bool) net.PacketConn + func WriteClientHello(stream io.Writer, hello ClientHello) error + func WriteClientRequest(request ClientRequest, payload []byte) *buf.Buffer + func WriteServerHello(stream io.Writer, hello ServerHello) error + func WriteServerResponse(stream quic.Stream, response ServerResponse) error + type Client struct + func NewClient(options ClientOptions) (*Client, error) + func (c *Client) CloseWithError(err error) error + func (c *Client) DialConn(ctx context.Context, destination M.Socksaddr) (net.Conn, error) + func (c *Client) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + type ClientHello struct + Auth string + RecvBPS uint64 + SendBPS uint64 + func ReadClientHello(reader io.Reader) (*ClientHello, error) + type ClientOptions struct + BrutalDebug bool + ConnReceiveWindow uint64 + Context context.Context + Dialer N.Dialer + DisableMTUDiscovery bool + HopInterval int + HopPorts string + Logger logger.Logger + Password string + ReceiveBPS uint64 + SendBPS uint64 + ServerAddress M.Socksaddr + StreamReceiveWindow uint64 + TLSConfig aTLS.Config + UDPDisabled bool + XPlusPassword string + type ClientRequest struct + Host string + Port uint16 + UDP bool + func ReadClientRequest(stream io.Reader) (*ClientRequest, error) + type ServerHandler interface + type ServerHello struct + Message string + OK bool + RecvBPS uint64 + SendBPS uint64 + func ReadServerHello(stream io.Reader) (*ServerHello, error) + type ServerResponse struct + Message string + OK bool + UDPSessionID uint32 + func ReadServerResponse(stream io.Reader) (*ServerResponse, error) + type Service struct + func NewService[U comparable](options ServiceOptions) (*Service[U], error) + func (s *Service[U]) Close() error + func (s *Service[U]) Start(conn net.PacketConn) error + func (s *Service[U]) UpdateUsers(userList []U, passwordList []string) + type ServiceOptions struct + BrutalDebug bool + ConnReceiveWindow uint64 + Context context.Context + DisableMTUDiscovery bool + Handler ServerHandler + Logger logger.Logger + MaxIncomingStreams int64 + ReceiveBPS uint64 + SendBPS uint64 + StreamReceiveWindow uint64 + TLSConfig aTLS.ServerConfig + UDPDisabled bool + UDPTimeout time.Duration + XPlusPassword string + type VectorisedXPlusConn struct + func (c *VectorisedXPlusConn) WriteTo(p []byte, addr net.Addr) (n int, err error) + func (c *VectorisedXPlusConn) WriteVectorisedPacket(buffers []*buf.Buffer, destination M.Socksaddr) error + type XPlusPacketConn struct + func (c *XPlusPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) + func (c *XPlusPacketConn) Upstream() any + func (c *XPlusPacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)