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 )
View Source
const (
TCPTimeout = 5 * time.Second
)
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
func WriteBrutalRequest ¶ added in v0.1.5
Types ¶
type BrutalOptions ¶ added in v0.1.5
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DialContext ¶
func (*Client) ListenPacket ¶
type Service ¶ added in v0.1.5
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶ added in v0.1.5
func NewService(options ServiceOptions) (*Service, error)
type ServiceHandler ¶ added in v0.1.5
type ServiceHandler interface { N.TCPConnectionHandler N.UDPConnectionHandler }
type ServiceOptions ¶ added in v0.1.5
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 ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.