mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
adjust
This commit is contained in:
parent
bad397bf22
commit
575c7a9687
3 changed files with 6 additions and 6 deletions
|
@ -117,12 +117,12 @@ func canLookupIP(ctx context.Context, dst net.Destination, sockopt *SocketConfig
|
|||
func redirect(ctx context.Context, dst net.Destination, obt string) net.Conn {
|
||||
newError("redirecting request " + dst.String() + " to " + obt).WriteToLog(session.ExportIDToError(ctx))
|
||||
h := obm.GetHandler(obt)
|
||||
ctx = session.ContextWithOutbound(ctx, &session.Outbound{dst, nil})
|
||||
ctx = session.ContextWithOutbound(ctx, &session.Outbound{Target: dst, Gateway: nil})
|
||||
if h != nil {
|
||||
ur, uw := pipe.New(pipe.OptionsFromContext(ctx)...)
|
||||
dr, dw := pipe.New(pipe.OptionsFromContext(ctx)...)
|
||||
|
||||
go h.Dispatch(ctx, &transport.Link{ur, dw})
|
||||
go h.Dispatch(ctx, &transport.Link{Reader: ur, Writer: dw})
|
||||
nc := cnc.NewConnection(
|
||||
cnc.ConnectionInputMulti(uw),
|
||||
cnc.ConnectionOutputMulti(dr),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue