mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 17:46:58 -05:00
update router to adapt to protobuf change
This commit is contained in:
parent
aa17eacc8d
commit
935cf69fb1
@ -15,7 +15,7 @@ import (
|
||||
|
||||
// Router is an implementation of routing.Router.
|
||||
type Router struct {
|
||||
domainStrategy Config_DomainStrategy
|
||||
domainStrategy DomainStrategy
|
||||
rules []*Rule
|
||||
balancers map[string]*Balancer
|
||||
dns dns.Client
|
||||
@ -86,7 +86,7 @@ func (r *Router) pickRouteInternal(ctx routing.Context) (*Rule, routing.Context,
|
||||
// this prevents cycle resolving dead loop
|
||||
skipDNSResolve := ctx.GetSkipDNSResolve()
|
||||
|
||||
if r.domainStrategy == Config_IpOnDemand && !skipDNSResolve {
|
||||
if r.domainStrategy == DomainStrategy_IpOnDemand && !skipDNSResolve {
|
||||
ctx = routing_dns.ContextWithDNSClient(ctx, r.dns)
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ func (r *Router) pickRouteInternal(ctx routing.Context) (*Rule, routing.Context,
|
||||
}
|
||||
}
|
||||
|
||||
if r.domainStrategy != Config_IpIfNonMatch || len(ctx.GetTargetDomain()) == 0 || skipDNSResolve {
|
||||
if r.domainStrategy != DomainStrategy_IpIfNonMatch || len(ctx.GetTargetDomain()) == 0 || skipDNSResolve {
|
||||
return nil, ctx, common.ErrNoClue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user