Add basic clash api
This commit is contained in:
@@ -48,6 +48,10 @@ type DefaultRule struct {
|
||||
outbound string
|
||||
}
|
||||
|
||||
func (r *DefaultRule) Type() string {
|
||||
return C.RuleTypeDefault
|
||||
}
|
||||
|
||||
type RuleItem interface {
|
||||
Match(metadata *adapter.InboundContext) bool
|
||||
String() string
|
||||
@@ -238,6 +242,10 @@ type LogicalRule struct {
|
||||
outbound string
|
||||
}
|
||||
|
||||
func (r *LogicalRule) Type() string {
|
||||
return C.RuleTypeLogical
|
||||
}
|
||||
|
||||
func (r *LogicalRule) UpdateGeosite() error {
|
||||
for _, rule := range r.rules {
|
||||
err := rule.UpdateGeosite()
|
||||
|
||||
Reference in New Issue
Block a user