mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-12-12 04:34:41 +04:00
Refactor WrapLink logic (#5288)
https://github.com/XTLS/Xray-core/pull/5133 https://github.com/XTLS/Xray-core/pull/5286
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/xtls/xray-core/app/dispatcher"
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
"github.com/xtls/xray-core/common/mux"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
@@ -231,7 +230,9 @@ func (w *BridgeWorker) DispatchLink(ctx context.Context, dest net.Destination, l
|
||||
return w.Dispatcher.DispatchLink(ctx, dest, link)
|
||||
}
|
||||
|
||||
link = w.Dispatcher.(*dispatcher.DefaultDispatcher).WrapLink(ctx, link)
|
||||
if d, ok := w.Dispatcher.(routing.WrapLinkDispatcher); ok {
|
||||
link = d.WrapLink(ctx, link)
|
||||
}
|
||||
w.handleInternalConn(link)
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user