1
0
mirror of https://github.com/MetaCubeX/mihomo.git synced 2025-09-20 20:45:58 +08:00
Files
mihomo/rule/common/final.go
MetaCubeX 435bee0ca2 update
2022-03-17 23:24:07 +08:00

36 lines
476 B
Go

package common
import (
C "github.com/Dreamacro/clash/constant"
)
type Match struct {
*Base
adapter string
}
func (f *Match) RuleType() C.RuleType {
return C.MATCH
}
func (f *Match) Match(metadata *C.Metadata) bool {
return true
}
func (f *Match) Adapter() string {
return f.adapter
}
func (f *Match) Payload() string {
return ""
}
func NewMatch(adapter string) *Match {
return &Match{
Base: &Base{},
adapter: adapter,
}
}
var _ C.Rule = (*Match)(nil)