This repository has been archived on 2024-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
2022-06-09 21:08:46 +08:00

30 lines
398 B
Go

package sniffer
import "github.com/Dreamacro/clash/constant"
type Sniffer interface {
SupportNetwork() constant.NetWork
SniffTCP(bytes []byte) (string, error)
Protocol() string
}
const (
TLS Type = iota
HTTP
)
var List = []Type{TLS, HTTP}
type Type int
func (rt Type) String() string {
switch rt {
case TLS:
return "TLS"
case HTTP:
return "HTTP"
default:
return "Unknown"
}
}