mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 05:31:18 +08:00
32 lines
420 B
Go
32 lines
420 B
Go
package rules
|
|
|
|
import (
|
|
C "github.com/Dreamacro/clash/constant"
|
|
)
|
|
|
|
type Match struct {
|
|
adapter string
|
|
}
|
|
|
|
func (f *Match) RuleType() C.RuleType {
|
|
return C.MATCH
|
|
}
|
|
|
|
func (f *Match) IsMatch(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{
|
|
adapter: adapter,
|
|
}
|
|
}
|