mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
29 lines
378 B
Go
29 lines
378 B
Go
package constant
|
|
|
|
type Sniffer interface {
|
|
SupportNetwork() NetWork
|
|
SniffTCP(bytes []byte) (string, error)
|
|
Protocol() string
|
|
}
|
|
|
|
const (
|
|
TLS SnifferType = iota
|
|
)
|
|
|
|
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"
|
|
}
|
|
}
|