Documentation ¶
Index ¶
- Variables
- func ContainsValidHTTPMethod(b []byte) bool
- func IsValidTLSVersion(major, minor byte) bool
- func ReadClientHello(data []byte) (string, error)
- func SniffHTTP(b []byte) (string, error)
- func SniffTLS(b []byte) (string, error)
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetSettings() *SessionConfig
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type DefaultDispatcher
- type SessionConfig
- func (*SessionConfig) Descriptor() ([]byte, []int)
- func (*SessionConfig) ProtoMessage()
- func (m *SessionConfig) Reset()
- func (m *SessionConfig) String() string
- func (m *SessionConfig) XXX_DiscardUnknown()
- func (m *SessionConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SessionConfig) XXX_Merge(src proto.Message)
- func (m *SessionConfig) XXX_Size() int
- func (m *SessionConfig) XXX_Unmarshal(b []byte) error
- type Sniffer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMoreData = newError("need more data") ErrInvalidData = newError("invalid data") )
Functions ¶
func ContainsValidHTTPMethod ¶
func IsValidTLSVersion ¶
func ReadClientHello ¶
ReadClientHello returns server name (if any) from TLS client hello message. https://github.com/golang/go/blob/master/src/crypto/tls/handshake_messages.go#L300
Types ¶
type Config ¶
type Config struct { Settings *SessionConfig `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Config) Descriptor ¶
func (*Config) GetSettings ¶
func (m *Config) GetSettings() *SessionConfig
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶
func (*Config) XXX_Unmarshal ¶
type DefaultDispatcher ¶
type DefaultDispatcher struct {
// contains filtered or unexported fields
}
DefaultDispatcher is a default implementation of Dispatcher.
func NewDefaultDispatcher ¶
func NewDefaultDispatcher(ctx context.Context, config *Config) (*DefaultDispatcher, error)
NewDefaultDispatcher create a new DefaultDispatcher.
func (*DefaultDispatcher) Close ¶
func (*DefaultDispatcher) Close() error
Close implements common.Closable.
func (*DefaultDispatcher) Dispatch ¶
func (d *DefaultDispatcher) Dispatch(ctx context.Context, destination net.Destination) (*core.Link, error)
Dispatch implements core.Dispatcher.
func (*DefaultDispatcher) Start ¶
func (*DefaultDispatcher) Start() error
Start implements common.Runnable.
type SessionConfig ¶
type SessionConfig struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SessionConfig) Descriptor ¶
func (*SessionConfig) Descriptor() ([]byte, []int)
func (*SessionConfig) ProtoMessage ¶
func (*SessionConfig) ProtoMessage()
func (*SessionConfig) Reset ¶
func (m *SessionConfig) Reset()
func (*SessionConfig) String ¶
func (m *SessionConfig) String() string
func (*SessionConfig) XXX_DiscardUnknown ¶
func (m *SessionConfig) XXX_DiscardUnknown()
func (*SessionConfig) XXX_Marshal ¶
func (m *SessionConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SessionConfig) XXX_Merge ¶
func (dst *SessionConfig) XXX_Merge(src proto.Message)
func (*SessionConfig) XXX_Size ¶
func (m *SessionConfig) XXX_Size() int
func (*SessionConfig) XXX_Unmarshal ¶
func (m *SessionConfig) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.