Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_proxy_hysteria2_config_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func (*Account) Descriptor
deprecated
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an inbound handler
type ClientConfig ¶
type ClientConfig struct { Server []*protocol.ServerEndpoint `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"` // contains filtered or unexported fields }
func (*ClientConfig) Descriptor
deprecated
func (*ClientConfig) Descriptor() ([]byte, []int)
Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
func (*ClientConfig) GetServer ¶
func (x *ClientConfig) GetServer() []*protocol.ServerEndpoint
func (*ClientConfig) ProtoMessage ¶
func (*ClientConfig) ProtoMessage()
func (*ClientConfig) ProtoReflect ¶
func (x *ClientConfig) ProtoReflect() protoreflect.Message
func (*ClientConfig) Reset ¶
func (x *ClientConfig) Reset()
func (*ClientConfig) String ¶
func (x *ClientConfig) String() string
type ConnReader ¶
type ConnReader struct { io.Reader Target net.Destination }
ConnReader is TCP Connection Reader Wrapper
func (*ConnReader) Read ¶
func (c *ConnReader) Read(p []byte) (int, error)
Read implements io.Reader
func (*ConnReader) ReadMultiBuffer ¶
func (c *ConnReader) ReadMultiBuffer() (buf.MultiBuffer, error)
ReadMultiBuffer implements buf.Reader
type ConnWriter ¶
type ConnWriter struct { io.Writer Target net.Destination TCPHeaderSent bool }
ConnWriter is TCP Connection Writer Wrapper
func (*ConnWriter) Write ¶
func (c *ConnWriter) Write(p []byte) (n int, err error)
Write implements io.Writer
func (*ConnWriter) WriteMultiBuffer ¶
func (c *ConnWriter) WriteMultiBuffer(mb buf.MultiBuffer) error
WriteMultiBuffer implements buf.Writer
func (*ConnWriter) WriteTCPHeader ¶
func (c *ConnWriter) WriteTCPHeader() error
type MemoryAccount ¶
type MemoryAccount struct{}
MemoryAccount is an account type converted from Account.
type PacketConnectionReader ¶ added in v5.19.0
type PacketConnectionReader struct {
// contains filtered or unexported fields
}
type PacketPayload ¶
type PacketPayload struct { Target net.Destination Buffer buf.MultiBuffer }
PacketPayload combines udp payload and destination
type PacketReader ¶
type PacketReader struct { io.Reader HyConn *hyTransport.HyConn }
PacketReader is UDP Connection Reader Wrapper
func (*PacketReader) ReadMultiBuffer ¶
func (r *PacketReader) ReadMultiBuffer() (buf.MultiBuffer, error)
ReadMultiBuffer implements buf.Reader
func (*PacketReader) ReadMultiBufferWithMetadata ¶
func (r *PacketReader) ReadMultiBufferWithMetadata() (*PacketPayload, error)
ReadMultiBufferWithMetadata reads udp packet with destination
type PacketWriter ¶
type PacketWriter struct { io.Writer HyConn *hyTransport.HyConn Target net.Destination }
PacketWriter UDP Connection Writer Wrapper
func (*PacketWriter) WriteMultiBuffer ¶
func (w *PacketWriter) WriteMultiBuffer(mb buf.MultiBuffer) error
WriteMultiBuffer implements buf.Writer
func (*PacketWriter) WriteMultiBufferWithMetadata ¶
func (w *PacketWriter) WriteMultiBufferWithMetadata(mb buf.MultiBuffer, dest net.Destination) error
WriteMultiBufferWithMetadata writes udp packet with destination specified
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an inbound connection handler that handles messages in protocol.
func NewServer ¶
func NewServer(ctx context.Context, config *ServerConfig) (*Server, error)
NewServer creates a new inbound handler.
type ServerConfig ¶
type ServerConfig struct { PacketEncoding packetaddr.PacketAddrType `` /* 150-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ServerConfig) Descriptor
deprecated
func (*ServerConfig) Descriptor() ([]byte, []int)
Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.
func (*ServerConfig) GetPacketEncoding ¶ added in v5.19.0
func (x *ServerConfig) GetPacketEncoding() packetaddr.PacketAddrType
func (*ServerConfig) ProtoMessage ¶
func (*ServerConfig) ProtoMessage()
func (*ServerConfig) ProtoReflect ¶
func (x *ServerConfig) ProtoReflect() protoreflect.Message
func (*ServerConfig) Reset ¶
func (x *ServerConfig) Reset()
func (*ServerConfig) String ¶
func (x *ServerConfig) String() string