Documentation ¶
Index ¶
- type AddressType
- type Client
- type ClientManager
- type FrameMetadata
- type MetadataReader
- type Option
- type PacketReader
- type Server
- type ServerWorker
- type Session
- type SessionManager
- func (m *SessionManager) Add(s *Session)
- func (m *SessionManager) Allocate() *Session
- func (m *SessionManager) Close()
- func (m *SessionManager) CloseIfNoSession() bool
- func (m *SessionManager) Count() int
- func (m *SessionManager) Get(id uint16) (*Session, bool)
- func (m *SessionManager) Remove(id uint16)
- func (m *SessionManager) Size() int
- type SessionStatus
- type StreamReader
- type TargetNetwork
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressType ¶
type AddressType byte
const ( AddressTypeIPv4 AddressType = 0x01 AddressTypeDomain AddressType = 0x02 AddressTypeIPv6 AddressType = 0x03 )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type ClientManager ¶
type ClientManager struct {
// contains filtered or unexported fields
}
func NewClientManager ¶
func NewClientManager(p proxy.Outbound, d proxy.Dialer, c *proxyman.MultiplexingConfig) *ClientManager
func (*ClientManager) Dispatch ¶
func (m *ClientManager) Dispatch(ctx context.Context, outboundRay ray.OutboundRay) error
type FrameMetadata ¶
type FrameMetadata struct { SessionID uint16 SessionStatus SessionStatus Target net.Destination Option Option }
func ReadFrameFrom ¶
func ReadFrameFrom(b []byte) (*FrameMetadata, error)
func (FrameMetadata) AsSupplier ¶
func (f FrameMetadata) AsSupplier() buf.Supplier
type MetadataReader ¶
type MetadataReader struct {
// contains filtered or unexported fields
}
func NewMetadataReader ¶
func NewMetadataReader(reader io.Reader) *MetadataReader
func (*MetadataReader) Read ¶
func (r *MetadataReader) Read() (*FrameMetadata, error)
type PacketReader ¶
type PacketReader struct {
// contains filtered or unexported fields
}
func NewPacketReader ¶
func NewPacketReader(reader io.Reader) *PacketReader
func (*PacketReader) Read ¶
func (r *PacketReader) Read() (buf.MultiBuffer, error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Dispatch ¶
func (s *Server) Dispatch(ctx context.Context, dest net.Destination) (ray.InboundRay, error)
type ServerWorker ¶
type ServerWorker struct {
// contains filtered or unexported fields
}
type SessionManager ¶
func NewSessionManager ¶
func NewSessionManager() *SessionManager
func (*SessionManager) Add ¶
func (m *SessionManager) Add(s *Session)
func (*SessionManager) Allocate ¶
func (m *SessionManager) Allocate() *Session
func (*SessionManager) Close ¶
func (m *SessionManager) Close()
func (*SessionManager) CloseIfNoSession ¶
func (m *SessionManager) CloseIfNoSession() bool
func (*SessionManager) Count ¶
func (m *SessionManager) Count() int
func (*SessionManager) Remove ¶
func (m *SessionManager) Remove(id uint16)
func (*SessionManager) Size ¶
func (m *SessionManager) Size() int
type SessionStatus ¶
type SessionStatus byte
const ( SessionStatusNew SessionStatus = 0x01 SessionStatusKeep SessionStatus = 0x02 SessionStatusEnd SessionStatus = 0x03 SessionStatusKeepAlive SessionStatus = 0x04 )
type StreamReader ¶
type StreamReader struct {
// contains filtered or unexported fields
}
func NewStreamReader ¶
func NewStreamReader(reader io.Reader) *StreamReader
func (*StreamReader) Read ¶
func (r *StreamReader) Read() (buf.MultiBuffer, error)
type TargetNetwork ¶
type TargetNetwork byte
const ( TargetNetworkTCP TargetNetwork = 0x01 TargetNetworkUDP TargetNetwork = 0x02 )
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewResponseWriter ¶
func NewWriter ¶
func NewWriter(id uint16, dest net.Destination, writer buf.Writer, transferType protocol.TransferType) *Writer
Click to show internal directories.
Click to hide internal directories.