Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHttpByRequest ¶
CheckHttpByRequest check 是否是http请求
func CheckHttpByResponse ¶
CheckHttpByResponse check 是否是http响应
func GenerateSessionId ¶
GenerateSessionId 生成五元祖hash
Types ¶
type Device ¶
type HTTPHandler ¶
type HTTPHandler struct { }
func (HTTPHandler) HandleData ¶
func (HTTPHandler) HandleData(data []byte, sr StreamReaderInterface) (int, bool)
type ProtocolHandler ¶
type ProtocolHandler interface {
HandleData(data []byte, reader StreamReaderInterface) (int, bool)
}
type ProtocolType ¶
type ProtocolType string
const ( HTTP ProtocolType = "http" TLS ProtocolType = "tls" DNS ProtocolType = "dns" UNKNOWN ProtocolType = "unknown" )
func IdentifyProtocol ¶
func IdentifyProtocol(buffer []byte, srcPort, dstPort string) ProtocolType
IdentifyProtocol 识别协议
type StreamReaderInterface ¶
type StreamReaderInterface interface { GetIdentifier([]byte) ProtocolType GetIdent() bool SetUrls(urls string) GetUrls() []string LockParent() UnLockParent() SetHttpInfo(host, userAgent, contentType, upgrade string) SetTlsInfo(sni, version, cipherSuite string) SetApplicationProtocol(applicationProtocol ProtocolType) }
StreamReaderInterface 流Reader接口
type TLSHandler ¶
type TLSHandler struct{}
func (TLSHandler) HandleData ¶
func (TLSHandler) HandleData(data []byte, reader StreamReaderInterface) (int, bool)
Click to show internal directories.
Click to hide internal directories.