1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-05 16:55:27 -05:00

prototype of commander

This commit is contained in:
Darien Raymond
2018-02-05 23:38:24 +01:00
parent 384844f898
commit 1e6d5561cc
20 changed files with 1097 additions and 33 deletions

View File

@@ -105,7 +105,7 @@ func (h *Handler) Dial(ctx context.Context, dest net.Destination) (internet.Conn
ctx = proxy.ContextWithTarget(ctx, dest)
stream := ray.NewRay(ctx)
go handler.Dispatch(ctx, stream)
return ray.NewConnection(stream, zeroAddr, zeroAddr), nil
return ray.NewConnection(stream.InboundOutput(), stream.InboundInput()), nil
}
newError("failed to get outbound handler with tag: ", tag).AtWarning().WriteToLog()
@@ -122,3 +122,7 @@ func (h *Handler) Dial(ctx context.Context, dest net.Destination) (internet.Conn
return internet.Dial(ctx, dest)
}
func (h *Handler) GetOutbound() proxy.Outbound {
return h.proxy
}