Documentation ¶
Index ¶
- Variables
- func EncodeRequest(buffer *buf.Buffer, request Request)
- func EncodeStreamRequest(request StreamRequest, buffer *buf.Buffer)
- func NewClientWithOptions(ctx context.Context, dialer N.Dialer, options option.MultiplexOptions) (N.Dialer, error)
- func NewConnection(ctx context.Context, router adapter.Router, errorHandler E.Handler, ...) error
- type Client
- type ClientConn
- func (c *ClientConn) LocalAddr() net.Addr
- func (c *ClientConn) Read(b []byte) (n int, err error)
- func (c *ClientConn) ReadFrom(r io.Reader) (n int64, err error)
- func (c *ClientConn) ReaderReplaceable() bool
- func (c *ClientConn) RemoteAddr() net.Addr
- func (c *ClientConn) Upstream() any
- func (c *ClientConn) Write(b []byte) (n int, err error)
- func (c *ClientConn) WriteTo(w io.Writer) (n int64, err error)
- func (c *ClientConn) WriterReplaceable() bool
- type ClientPacketAddrConn
- func (c *ClientPacketAddrConn) FrontHeadroom() int
- func (c *ClientPacketAddrConn) LocalAddr() net.Addr
- func (c *ClientPacketAddrConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *ClientPacketAddrConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *ClientPacketAddrConn) Upstream() any
- func (c *ClientPacketAddrConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- func (c *ClientPacketAddrConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- type ClientPacketConn
- func (c *ClientPacketConn) FrontHeadroom() int
- func (c *ClientPacketConn) LocalAddr() net.Addr
- func (c *ClientPacketConn) Read(b []byte) (n int, err error)
- func (c *ClientPacketConn) ReadBuffer(buffer *buf.Buffer) (err error)
- func (c *ClientPacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *ClientPacketConn) RemoteAddr() net.Addr
- func (c *ClientPacketConn) Upstream() any
- func (c *ClientPacketConn) Write(b []byte) (n int, err error)
- func (c *ClientPacketConn) WriteBuffer(buffer *buf.Buffer) error
- func (c *ClientPacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- type Protocol
- type Request
- type ServerConn
- type ServerPacketAddrConn
- func (c *ServerPacketAddrConn) FrontHeadroom() int
- func (c *ServerPacketAddrConn) HandshakeFailure(err error) error
- func (c *ServerPacketAddrConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *ServerPacketAddrConn) Upstream() any
- func (c *ServerPacketAddrConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- type ServerPacketConn
- func (c *ServerPacketConn) FrontHeadroom() int
- func (c *ServerPacketConn) HandshakeFailure(err error) error
- func (c *ServerPacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *ServerPacketConn) Upstream() any
- func (c *ServerPacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- type StreamRequest
- type StreamResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var Destination = M.Socksaddr{
Fqdn: "sp.mux.sing-box.arpa",
Port: 444,
}
Functions ¶
func EncodeRequest ¶
func EncodeStreamRequest ¶
func EncodeStreamRequest(request StreamRequest, buffer *buf.Buffer)
func NewClientWithOptions ¶
func NewConnection ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DialContext ¶
func (*Client) ListenPacket ¶
type ClientConn ¶
func (*ClientConn) LocalAddr ¶
func (c *ClientConn) LocalAddr() net.Addr
func (*ClientConn) ReaderReplaceable ¶
func (c *ClientConn) ReaderReplaceable() bool
func (*ClientConn) RemoteAddr ¶
func (c *ClientConn) RemoteAddr() net.Addr
func (*ClientConn) Upstream ¶
func (c *ClientConn) Upstream() any
func (*ClientConn) WriterReplaceable ¶
func (c *ClientConn) WriterReplaceable() bool
type ClientPacketAddrConn ¶
type ClientPacketAddrConn struct { N.ExtendedConn // contains filtered or unexported fields }
func (*ClientPacketAddrConn) FrontHeadroom ¶
func (c *ClientPacketAddrConn) FrontHeadroom() int
func (*ClientPacketAddrConn) LocalAddr ¶
func (c *ClientPacketAddrConn) LocalAddr() net.Addr
func (*ClientPacketAddrConn) ReadPacket ¶
func (*ClientPacketAddrConn) Upstream ¶
func (c *ClientPacketAddrConn) Upstream() any
func (*ClientPacketAddrConn) WritePacket ¶
type ClientPacketConn ¶
type ClientPacketConn struct { N.ExtendedConn // contains filtered or unexported fields }
func (*ClientPacketConn) FrontHeadroom ¶
func (c *ClientPacketConn) FrontHeadroom() int
func (*ClientPacketConn) LocalAddr ¶
func (c *ClientPacketConn) LocalAddr() net.Addr
func (*ClientPacketConn) ReadBuffer ¶ added in v1.1.0
func (c *ClientPacketConn) ReadBuffer(buffer *buf.Buffer) (err error)
func (*ClientPacketConn) ReadPacket ¶ added in v1.1.0
func (*ClientPacketConn) RemoteAddr ¶
func (c *ClientPacketConn) RemoteAddr() net.Addr
func (*ClientPacketConn) Upstream ¶
func (c *ClientPacketConn) Upstream() any
func (*ClientPacketConn) WriteBuffer ¶
func (c *ClientPacketConn) WriteBuffer(buffer *buf.Buffer) error
func (*ClientPacketConn) WritePacket ¶
type ServerConn ¶
type ServerConn struct { N.ExtendedConn // contains filtered or unexported fields }
func (*ServerConn) FrontHeadroom ¶
func (c *ServerConn) FrontHeadroom() int
func (*ServerConn) HandshakeFailure ¶
func (c *ServerConn) HandshakeFailure(err error) error
func (*ServerConn) Upstream ¶
func (c *ServerConn) Upstream() any
func (*ServerConn) WriteBuffer ¶
func (c *ServerConn) WriteBuffer(buffer *buf.Buffer) error
type ServerPacketAddrConn ¶
type ServerPacketAddrConn struct { N.ExtendedConn // contains filtered or unexported fields }
func (*ServerPacketAddrConn) FrontHeadroom ¶
func (c *ServerPacketAddrConn) FrontHeadroom() int
func (*ServerPacketAddrConn) HandshakeFailure ¶
func (c *ServerPacketAddrConn) HandshakeFailure(err error) error
func (*ServerPacketAddrConn) ReadPacket ¶
func (*ServerPacketAddrConn) Upstream ¶
func (c *ServerPacketAddrConn) Upstream() any
func (*ServerPacketAddrConn) WritePacket ¶
type ServerPacketConn ¶
type ServerPacketConn struct { N.ExtendedConn // contains filtered or unexported fields }
func (*ServerPacketConn) FrontHeadroom ¶
func (c *ServerPacketConn) FrontHeadroom() int
func (*ServerPacketConn) HandshakeFailure ¶
func (c *ServerPacketConn) HandshakeFailure(err error) error
func (*ServerPacketConn) ReadPacket ¶
func (*ServerPacketConn) Upstream ¶
func (c *ServerPacketConn) Upstream() any
func (*ServerPacketConn) WritePacket ¶
type StreamRequest ¶
func ReadStreamRequest ¶
func ReadStreamRequest(reader io.Reader) (*StreamRequest, error)
type StreamResponse ¶
func ReadStreamResponse ¶
func ReadStreamResponse(reader io.Reader) (*StreamResponse, error)
Click to show internal directories.
Click to hide internal directories.