From 0921470341fb08e4e5ed1b4dcfb18b64cd5d0813 Mon Sep 17 00:00:00 2001 From: v2ray Date: Tue, 5 Jan 2016 21:54:23 +0100 Subject: [PATCH] use packet filter in point --- shell/point/point.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shell/point/point.go b/shell/point/point.go index dbc3dae37..888f70dc2 100644 --- a/shell/point/point.go +++ b/shell/point/point.go @@ -157,18 +157,19 @@ func (this *Point) DispatchToOutbound(context app.Context, packet v2net.Packet) direct := ray.NewRay() dest := packet.Destination() + dispatcher := this.och + if this.router != nil { tag, err := this.router.TakeDetour(dest) if err == nil { handler, found := this.odh[tag] if found { - go handler.Dispatch(packet, direct) - return direct + dispatcher = handler } } } - go this.och.Dispatch(packet, direct) + go this.FilterPacketAndDispatch(packet, direct, dispatcher) return direct }