1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-02-02 06:15:24 -05:00

split listening settings from inbound proxies and apply context

This commit is contained in:
Darien Raymond
2017-01-26 20:46:44 +01:00
parent 3bbdf2a065
commit ca721230e1
73 changed files with 2086 additions and 2957 deletions

View File

@@ -1,11 +1,11 @@
package router
import (
"context"
"net"
"v2ray.com/core/common/errors"
v2net "v2ray.com/core/common/net"
"v2ray.com/core/proxy"
)
type Rule struct {
@@ -13,8 +13,8 @@ type Rule struct {
Condition Condition
}
func (v *Rule) Apply(session *proxy.SessionInfo) bool {
return v.Condition.Apply(session)
func (v *Rule) Apply(ctx context.Context) bool {
return v.Condition.Apply(ctx)
}
func (v *RoutingRule) BuildCondition() (Condition, error) {