mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-27 20:45:28 -05:00
update context functions
This commit is contained in:
@@ -70,7 +70,11 @@ func (v *Router) TakeDetour(ctx context.Context) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
dest := proxy.DestinationFromContext(ctx)
|
||||
dest, ok := proxy.TargetFromContext(ctx)
|
||||
if !ok {
|
||||
return "", ErrNoRuleApplicable
|
||||
}
|
||||
|
||||
if v.domainStrategy == Config_IpIfNonMatch && dest.Address.Family().IsDomain() {
|
||||
log.Info("Router: Looking up IP for ", dest)
|
||||
ipDests := v.resolveIP(dest)
|
||||
|
||||
Reference in New Issue
Block a user