Documentation
¶
Index ¶
- Constants
- Variables
- 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
- type Client
- type Options
- type Request
- type Service
- type ServiceHandler
- type ServiceOptions
- type StreamRequest
- type StreamResponse
- type TCPBrutalParams
Constants ¶
View Source
const ( BrutalExchangeDomain = "_BrutalBwExchange" BrutalMinSpeedBPS = 65536 )
View Source
const ( BrutalAvailable = true TCP_BRUTAL_PARAMS = 23301 )
View Source
const ( ProtocolSmux = iota ProtocolYAMux ProtocolH2Mux )
View Source
const ( Version0 = iota Version1 )
Variables ¶
View Source
var Destination = M.Socksaddr{
Fqdn: "sp.mux.sing-box.arpa",
Port: 444,
}
Functions ¶
func EncodeStreamRequest ¶
func EncodeStreamRequest(request StreamRequest, buffer *buf.Buffer) error
Types ¶
type BrutalOptions ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DialContext ¶
func (*Client) ListenPacket ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(options ServiceOptions) (*Service, error)
type ServiceHandler ¶
type ServiceHandler interface {
N.TCPConnectionHandler
N.UDPConnectionHandler
}
type ServiceOptions ¶
type ServiceOptions struct {
NewStreamContext func(context.Context, net.Conn) context.Context
Logger logger.ContextLogger
Handler ServiceHandler
Padding bool
Brutal BrutalOptions
}
type StreamRequest ¶
func ReadStreamRequest ¶
func ReadStreamRequest(reader io.Reader) (*StreamRequest, error)
type StreamResponse ¶
func ReadStreamResponse ¶
func ReadStreamResponse(reader io.Reader) (*StreamResponse, error)
type TCPBrutalParams ¶
Click to show internal directories.
Click to hide internal directories.