Documentation ¶
Index ¶
- type AddressType
- type Client
- type ClientManager
- type FrameMetadata
- type Option
- type Reader
- 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) Get(id uint16) (*Session, bool)
- func (m *SessionManager) Remove(id uint16)
- func (m *SessionManager) Size() int
- type SessionStatus
- 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 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 Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ReadMetadata ¶
func (r *Reader) ReadMetadata() (*FrameMetadata, 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 Session ¶
func (*Session) CloseDownlink ¶
func (s *Session) CloseDownlink()
func (*Session) CloseUplink ¶
func (s *Session) CloseUplink()
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) 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 TargetNetwork ¶
type TargetNetwork byte
const ( TargetNetworkTCP TargetNetwork = 0x01 TargetNetworkUDP TargetNetwork = 0x02 )
Click to show internal directories.
Click to hide internal directories.