mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-27 04:25:44 -05:00
Extract session information during routing as routing context
This commit is contained in:
@@ -5,6 +5,7 @@ package router
|
||||
import (
|
||||
"v2ray.com/core/common/net"
|
||||
"v2ray.com/core/features/outbound"
|
||||
"v2ray.com/core/features/routing"
|
||||
)
|
||||
|
||||
// CIDRList is an alias of []*CIDR to provide sort.Interface.
|
||||
@@ -59,7 +60,8 @@ func (r *Rule) GetTag() (string, error) {
|
||||
return r.Tag, nil
|
||||
}
|
||||
|
||||
func (r *Rule) Apply(ctx *Context) bool {
|
||||
// Apply checks rule matching of current routing context.
|
||||
func (r *Rule) Apply(ctx routing.Context) bool {
|
||||
return r.Condition.Apply(ctx)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user