update context functions

This commit is contained in:
Darien Raymond
2017-02-09 22:49:38 +01:00
parent d270a99d4f
commit d04d92c187
15 changed files with 122 additions and 98 deletions
+4 -1
View File
@@ -67,7 +67,10 @@ func (v *VMessOutboundHandler) Process(ctx context.Context, outboundRay ray.Outb
}
defer conn.Close()
target := proxy.DestinationFromContext(ctx)
target, ok := proxy.TargetFromContext(ctx)
if !ok {
return errors.New("VMess|Outbound: Target not specified.")
}
log.Info("VMess|Outbound: Tunneling request to ", target, " via ", rec.Destination())
command := protocol.RequestCommandTCP