feat(sniffer): add quic sniffer
This commit is contained in:
@ -4,7 +4,7 @@ import "github.com/Dreamacro/clash/constant"
|
||||
|
||||
type Sniffer interface {
|
||||
SupportNetwork() constant.NetWork
|
||||
SniffTCP(bytes []byte) (string, error)
|
||||
SniffData(bytes []byte) (string, error)
|
||||
Protocol() string
|
||||
SupportPort(port uint16) bool
|
||||
}
|
||||
@ -12,10 +12,11 @@ type Sniffer interface {
|
||||
const (
|
||||
TLS Type = iota
|
||||
HTTP
|
||||
QUIC
|
||||
)
|
||||
|
||||
var (
|
||||
List = []Type{TLS, HTTP}
|
||||
List = []Type{TLS, HTTP, QUIC}
|
||||
)
|
||||
|
||||
type Type int
|
||||
@ -26,6 +27,8 @@ func (rt Type) String() string {
|
||||
return "TLS"
|
||||
case HTTP:
|
||||
return "HTTP"
|
||||
case QUIC:
|
||||
return "QUIC"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
|
Reference in New Issue
Block a user