mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 13:41:23 +08:00
30 lines
403 B
Go
30 lines
403 B
Go
package constant
|
|
|
|
type Sniffer interface {
|
|
SupportNetwork() NetWork
|
|
SniffTCP(bytes []byte) (string, error)
|
|
Protocol() string
|
|
}
|
|
|
|
const (
|
|
TLS SnifferType = iota
|
|
HTTP SnifferType
|
|
)
|
|
|
|
var (
|
|
SnifferList = []SnifferType{TLS, HTTP}
|
|
)
|
|
|
|
type SnifferType int
|
|
|
|
func (rt SnifferType) String() string {
|
|
switch rt {
|
|
case TLS:
|
|
return "TLS"
|
|
case HTTP:
|
|
return "HTTP"
|
|
default:
|
|
return "Unknown"
|
|
}
|
|
}
|