Versions in this module Expand all Collapse all v0 v0.3.2 Mar 24, 2025 Changes in this version + const BrutalAvailable + const BrutalExchangeDomain + const BrutalMinSpeedBPS + const ProtocolH2Mux + const ProtocolSmux + const ProtocolYAMux + const TCPTimeout + const TCP_BRUTAL_PARAMS — linux/amd64 + const Version0 + const Version1 + var Destination = M.Socksaddr + func EncodeRequest(request Request, payload []byte) *buf.Buffer + func EncodeStreamRequest(request StreamRequest, buffer *buf.Buffer) error + func ReadBrutalRequest(reader io.Reader) (uint64, error) + func ReadBrutalResponse(reader io.Reader) (uint64, error) + func SetBrutalOptions(conn net.Conn, sendBPS uint64) error + func WriteBrutalRequest(writer io.Writer, receiveBPS uint64) error + func WriteBrutalResponse(writer io.Writer, receiveBPS uint64, ok bool, message string) error + type BrutalOptions struct + Enabled bool + ReceiveBPS uint64 + SendBPS uint64 + type Client struct + func NewClient(options Options) (*Client, error) + func (c *Client) Close() error + func (c *Client) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (c *Client) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + func (c *Client) Reset() + type Options struct + Brutal BrutalOptions + Dialer N.Dialer + Logger logger.Logger + MaxConnections int + MaxStreams int + MinStreams int + Padding bool + Protocol string + type Request struct + Padding bool + Protocol byte + Version byte + func ReadRequest(reader io.Reader) (*Request, error) + type Service struct + func NewService(options ServiceOptions) (*Service, error) + func (s *Service) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error + func (s *Service) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, ...) + type ServiceHandler interface + type ServiceHandlerEx interface + type ServiceOptions struct + Brutal BrutalOptions + Handler ServiceHandler + HandlerEx ServiceHandlerEx + Logger logger.ContextLogger + NewStreamContext func(context.Context, net.Conn) context.Context + Padding bool + type StreamRequest struct + Destination M.Socksaddr + Network string + PacketAddr bool + func ReadStreamRequest(reader io.Reader) (*StreamRequest, error) + type StreamResponse struct + Message string + Status uint8 + func ReadStreamResponse(reader io.Reader) (*StreamResponse, error) + type TCPBrutalParams struct — linux/amd64 + CwndGain uint32 + Rate uint64